-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds `--finalize-delay-sec` cli argument, based on the great work by @shunsukew at inkdevhub/swanky-node#61. Manual testing by starting node with/without option, along with example contract upload: ```shell # build example contract cargo contract build --manifest-path=../ink-examples/erc20/Cargo.toml # start node cargo run # upload contract cargo contract upload --suri //Alice --execute --manifest-path=../ink-examples/erc20/Cargo.toml # check finalized head remains at genesis sleep 1 test $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chainHead_unstable_genesisHash", "params":[]}' http://localhost:9944 | jq .result) \ = $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getFinalizedHead", "params":[]}' http://localhost:9944 | jq .result) && echo PASS || echo FAIL # start node (with delayed finalization) cargo run -- --finalize-delay-sec 1 # upload contract cargo contract upload --suri //Alice --execute --manifest-path=../ink-examples/erc20/Cargo.toml # check finalized head matches chain head sleep 1 test $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getHead", "params":[]}' http://localhost:9944 | jq .result) \ = $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getFinalizedHead", "params":[]}' http://localhost:9944 | jq .result) && echo PASS || echo FAIL ``` Closes #160
- Loading branch information
1 parent
f1d8389
commit 813d99f
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters