mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-08 21:13:46 +00:00
17 lines
385 B
Bash
Executable file
17 lines
385 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# See: https://geth.ethereum.org/docs/fundamentals/private-network's extradata section.
|
|
|
|
# Start with 32 bytes of zeros
|
|
extradata="0x$(printf '0%.0s' {1..64})"
|
|
|
|
for addr in "$@"; do
|
|
# Remove '0x' from the start of the address if present
|
|
addr="${addr#0x}"
|
|
extradata+="$addr"
|
|
done
|
|
|
|
# End with 65 bytes of zeros
|
|
extradata+=$(printf '0%.0s' {1..130})
|
|
|
|
echo "$extradata"
|