File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424config.yaml
2525.vscode
2626.vagrant
27+ .chain_code
Original file line number Diff line number Diff line change 11NUM_NODES=3
22
3+ make build
4+
35echo " 🚀 Start the services..."
46docker compose up -d
57sleep 3
Original file line number Diff line number Diff line change @@ -60,6 +60,23 @@ for i in $(seq 0 $((NUM_NODES-1))); do
6060 fi
6161done
6262
63+ # Distribute event_initiator_pubkey to all node configs
64+ if [ -f " event_initiator.identity.json" ]; then
65+ INITIATOR_PUBKEY=$( grep -o ' "public_key": *"[^"]*"' event_initiator.identity.json | cut -d ' "' -f4)
66+ if [ -n " ${INITIATOR_PUBKEY} " ]; then
67+ echo " 📦 Distributing event_initiator_pubkey to node configs ..."
68+ for i in $( seq 0 $(( NUM_NODES- 1 )) ) ; do
69+ if grep -q ' ^\s*event_initiator_pubkey:' " node$i /config.yaml" ; then
70+ if [[ " ${OSTYPE:- } " == darwin* ]]; then
71+ sed -i ' ' -E " s|^([[:space:]]*event_initiator_pubkey:).*|\1 \" ${INITIATOR_PUBKEY} \" |" " node$i /config.yaml"
72+ else
73+ sed -i -E " s|^([[:space:]]*event_initiator_pubkey:).*|\1 \" ${INITIATOR_PUBKEY} \" |" " node$i /config.yaml"
74+ fi
75+ fi
76+ done
77+ fi
78+ fi
79+
6380# Distribute identity files to all nodes
6481echo " 🔄 Distributing identity files across nodes..."
6582for i in $( seq 0 $(( NUM_NODES- 1 )) ) ; do
You can’t perform that action at this time.
0 commit comments