aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian-build.py
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-08-23 19:15:30 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-08-23 19:19:00 +0200
commit1bbe289f201c1a0981f519f8996c3563e9b871d3 (patch)
treeb9288112f70408c232470069ad581ac791ea9d90 /contrib/gitian-build.py
parentdbcb5742c48fd26f77e500291d7083e12eec741b (diff)
parentb0c8246cac97b7792a50afc22ef1fe39c5028e00 (diff)
downloadbitcoin-1bbe289f201c1a0981f519f8996c3563e9b871d3.tar.xz
Merge bitcoin/bitcoin#22565: [script] signet's getcoins.py improvements
b0c8246cac97b7792a50afc22ef1fe39c5028e00 Add cleaner errors for unsuccessful faucet transactions (NikhilBartwal) 1c612b274b1587c43ee6e6a486aed653b9ca5f70 [script] Update signet getcoins.py for custom network (NikhilBartwal) Pull request description: Currently, using the getcoins.py with a custom signet executes successfully and shows the transfer of 0.001 testBTC as complete, however for obvious reasons, it should not. In fact, upon verification it does not actually execute the transaction, but rather gives the output that it did, as shown below which can be misleading: ``` [nikhilb@nikhil-PC bitcoin]$ echo $datadir /home/nikhilb/signet-custom [nikhilb@nikhil-PC bitcoin]$ contrib/signet/getcoins.py -- -datadir=$datadir Payment of 0.00100000 BTC sent with txid dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86 [nikhilb@nikhil-PC bitcoin]$ bitcoin-cli -datadir=$datadir getrawtransaction dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86 error code: -5 error message: No such mempool or blockchain transaction. Use gettransaction for wallet transactions. [nikhilb@nikhil-PC bitcoin]$ bitcoin-cli -datadir=$datadir gettransaction dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86 error code: -5 error message: Invalid or non-wallet transaction id ``` This PR adds a sanity check for custom signet by comparing the current network's first block hash (the block after the genesis block) with global signet's respective block hash (since all signet networks share the same genesis block) and if a custom network is detected, the user is prompted to either work on the global signet or setup their own faucet. The PR was checked to be working successfully, giving the output as below: ``` [nikhilb@nikhil-PC bitcoin]$ git checkout update_signet_getcoins Switched to branch 'update_signet_getcoins' Your branch is ahead of 'upstream/master' by 1 commit. (use "git push" to publish your local commits) [nikhilb@nikhil-PC bitcoin]$ contrib/signet/getcoins.py -- -datadir=$datadir The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet for the same. You can have a look here for setting up your own faucet: https://en.bitcoin.it/wiki/Signet ``` ACKs for top commit: prayank23: utACK https://github.com/bitcoin/bitcoin/pull/22565/commits/b0c8246cac97b7792a50afc22ef1fe39c5028e00 kallewoof: ACK b0c8246cac97b7792a50afc22ef1fe39c5028e00 arnabsen1729: utACK b0c8246 prakash1512: utACK b0c8246 0xB10C: Tested ACK b0c8246cac97b7792a50afc22ef1fe39c5028e00 theStack: Tested ACK b0c8246cac97b7792a50afc22ef1fe39c5028e00 Zero-1729: crACK b0c8246 🧉 Tree-SHA512: 144b47a83008521a5cda13f4c1b12809a125a744f865a8e0f792132d52fdb88926d4f4f4d7230452c2e129b5879892cdbeda981b8af10b789e9fc0cda2905a5d
Diffstat (limited to 'contrib/gitian-build.py')
0 files changed, 0 insertions, 0 deletions