Skip to content

Commit

Permalink
Update Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Nov 29, 2019
1 parent 01f45d6 commit 61bf2d7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cardano-config/src/Cardano/Config/Topology.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ data RealNodeTopology = RealNodeTopology { rProducers :: ![RemoteAddress] }
instance FromJSON RealNodeTopology where
parseJSON = withObject "RealNodeTopology" $ \v ->
RealNodeTopology
<$> v .: "rProducers"
<$> v .: "Producers"

instance FromJSON NodeId where
parseJSON v = CoreId <$> parseJSON v
Expand Down
15 changes: 15 additions & 0 deletions configuration/realPBFT/simple-topology-real-pbft-node-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

{
"Producers":[
{
"addr":"127.0.0.1",
"port":3001,
"valency":1
},
{
"addr":"127.0.0.1",
"port":3002,
"valency":1
}
]
}
14 changes: 14 additions & 0 deletions configuration/realPBFT/simple-topology-real-pbft-node-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Producers":[
{
"addr":"127.0.0.1",
"port":3000,
"valency":1
},
{
"addr":"127.0.0.1",
"port":3002,
"valency":1
}
]
}
14 changes: 14 additions & 0 deletions configuration/realPBFT/simple-topology-real-pbft-node-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Producers":[
{
"addr":"127.0.0.1",
"port":3000,
"valency":1
},
{
"addr":"127.0.0.1",
"port":3001,
"valency":1
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rProducers": [
"Producers": [
{
"addr": "18.185.45.45",
"port": 3001,
Expand Down
6 changes: 3 additions & 3 deletions scripts/lib-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function dlgcert () {
printf -- "--delegation-certificate ${genesis_root}/delegation-cert.%03d.json " "$1"
}
function commonargs() {
printf -- "--topology configuration/simple-topology.json "
printf -- "--database-path ./db/node-$1 "
printf -- "--topology configuration/realPBFT/simple-topology-real-pbft-node-$1.json "
printf -- "--database-path ./node-$1 "
printf -- "--genesis-file ${genesis_file} "
printf -- "--socket-path ./socket/$1 "
printf -- "--socket-path ./socket/node-core-$1.socket "
}

function acceptorargs() {
Expand Down
6 changes: 3 additions & 3 deletions scripts/shelley-testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ tmux select-pane -t 4
tmux send-keys "cd '${PWD}'; ${CMD} trace-acceptor $(acceptorargs)" C-m
sleep 2
tmux select-pane -t 1
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 0 "${ALGO} $(echo -n ${EXTRA})") " C-m
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 0 "${ALGO} $(echo -n ${EXTRA})") " C-m
tmux select-pane -t 2
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 1 "${ALGO} $(echo -n ${EXTRA})") " C-m
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 1 "${ALGO} $(echo -n ${EXTRA})") " C-m
tmux select-pane -t 3
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node $(nodeargs 2 "${ALGO} $(echo -n ${EXTRA})") " C-m
tmux send-keys "cd '${PWD}'; ${CMD} exe:cardano-node run $(nodeargs 2 "${ALGO} $(echo -n ${EXTRA})") " C-m

0 comments on commit 61bf2d7

Please sign in to comment.