diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-09-23 09:00:36 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-09-23 09:02:00 +0200 |
commit | 82198938255783d2593f42a652efc9921550d86d (patch) | |
tree | 23c5790e00f1a5f8c9c00af323d60aaabae20eb5 /test | |
parent | b1291b2e8fc39b366765d905200f022823e3d50b (diff) | |
parent | facaf9e61f4b9ea91fab554d495ebea1043d08fb (diff) |
Merge #19993: refactor: Signet fixups
facaf9e61f4b9ea91fab554d495ebea1043d08fb doc: Document signet BIP (MarcoFalke)
faf0a26711eed9264113463e56b988cf9fe549fd doc: Update comments for new chain settings (-signet and -chain=signet) (MarcoFalke)
fae0548686cb3d095086d3f0fef38dcfcd31d8ca fuzz: Remove needless guard (MarcoFalke)
77771a03df6c5d940b340d15eb88f2ac9a29c13a refactor: Remove SignetTxs::m_valid and use optional instead (MarcoFalke)
fa2ad5dae17b237641b8ece0e68ffcdd79d543bf test: Run signet test even when wallet was not compiled (MarcoFalke)
Pull request description:
Some doc and test fixups for #18267
ACKs for top commit:
ajtowns:
ACK facaf9e61f4b9ea91fab554d495ebea1043d08fb -- code review only
dr-orlovsky:
Reviewed & ACK https://github.com/bitcoin/bitcoin/pull/19993/commits/facaf9e61f4b9ea91fab554d495ebea1043d08fb
kallewoof:
Code review ACK facaf9e61f4b9ea91fab554d495ebea1043d08fb
Tree-SHA512: 8085027c488d84bb4bddccba78bd2d4c5af0d8e2644ee72265f1f30fa8c83f61a961d9da2c796f2940e69682291cbee7b1028b6a6ce123ad9134c0ebbf4723b0
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/feature_signet.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/functional/feature_signet.py b/test/functional/feature_signet.py index f85431148d..a0e7f3ee6e 100755 --- a/test/functional/feature_signet.py +++ b/test/functional/feature_signet.py @@ -22,13 +22,14 @@ signet_blocks = [ '00000020a868e8514be5e46dabd6a122132f423f36a43b716a40c394e2a8d063e1010000f4c6c717e99d800c699c25a2006a75a0c5c09f432a936f385e6fce139cdbd1a5e9964d5fae77031e7d026e0001010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff025a51feffffff0200f2052a01000000160014aaa671c82b138e3b8f510cd801e5f2bd0aa305940000000000000000776a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf94c4fecc7daa24900473044022042309f4c3c7a1a2ac8c24f890f962df1c0086cec10be0868087cfc427520cb2702201dafee8911c269b7e786e242045bb57cef3f5b0f177010c6159abae42f646cc501000120000000000000000000000000000000000000000000000000000000000000000000000000', ] + class SignetBasicTest(BitcoinTestFramework): def set_test_params(self): self.chain = "signet" self.num_nodes = 6 self.setup_clean_chain = True - shared_args1 = ["-signetchallenge=51"] # OP_TRUE - shared_args2 = [] # default challenge + shared_args1 = ["-signetchallenge=51"] # OP_TRUE + shared_args2 = [] # default challenge # we use the exact same challenge except we do it as a 2-of-2, which means it should fail shared_args3 = ["-signetchallenge=522103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae"] @@ -38,9 +39,6 @@ class SignetBasicTest(BitcoinTestFramework): shared_args3, shared_args3, ] - def skip_test_if_missing_module(self): - self.skip_if_no_wallet() - def run_test(self): self.log.info("basic tests using OP_TRUE challenge") @@ -53,19 +51,20 @@ class SignetBasicTest(BitcoinTestFramework): assert_equal(mining_info['networkhashps'], Decimal('0')) assert_equal(mining_info['pooledtx'], 0) - self.nodes[0].generatetoaddress(1, self.nodes[0].getnewaddress()) + self.nodes[0].generate(1) self.log.info("pregenerated signet blocks check") height = 0 for block in signet_blocks: assert_equal(self.nodes[2].submitblock(block), None) - height = height + 1 + height += 1 assert_equal(self.nodes[2].getblockcount(), height) self.log.info("pregenerated signet blocks check (incompatible solution)") assert_equal(self.nodes[4].submitblock(signet_blocks[0]), 'bad-signet-blksig') + if __name__ == '__main__': SignetBasicTest().main() |