1
0
mirror of synced 2025-01-09 23:35:46 +00:00
nomos-node/testnet/scripts/node_key_from_id.sh
gusto eeb88b9430
Docker compose consensus layer config (#482)
* Same consensus node list for all nodes

* Extract duplicate code and add debug info

* Update initial net peer list script

* Remove unused envvar
2023-10-30 16:51:40 +02:00

18 lines
261 B
Bash
Executable File

#!/bin/sh
set -e
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <libp2p_node_mask> <node_id>"
exit 1
fi
libp2p_node_mask=$1
node_id=$2
node_key_from_id() {
echo "${libp2p_node_mask}" | sed "s/.\{${#node_id}\}$/${node_id}/"
}
node_key_from_id