Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_nulldummy.py
Show All 11 Lines | |||||
[Consensus] Check that the new NULLDUMMY rules are not enforced on the 431st block. | [Consensus] Check that the new NULLDUMMY rules are not enforced on the 431st block. | ||||
[Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block. | [Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block. | ||||
""" | """ | ||||
import time | import time | ||||
from test_framework.blocktools import create_block, create_coinbase | from test_framework.blocktools import create_block, create_coinbase | ||||
from test_framework.messages import CTransaction, FromHex, ToHex | from test_framework.messages import CTransaction, FromHex, ToHex | ||||
from test_framework.mininode import network_thread_start | |||||
from test_framework.script import CScript | from test_framework.script import CScript | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
# This test checks for a reject reason that changes after the graviton | # This test checks for a reject reason that changes after the graviton | ||||
# upgrade. Since the nulldummy effect and this test are destined to be removed | # upgrade. Since the nulldummy effect and this test are destined to be removed | ||||
# after the upgrade anyway, we run this test pre-upgrade only. | # after the upgrade anyway, we run this test pre-upgrade only. | ||||
# More detailed dummy tests can be found in abc-schnorrmultisig-activation.py. | # More detailed dummy tests can be found in abc-schnorrmultisig-activation.py. | ||||
Show All 23 Lines | def set_test_params(self): | ||||
self.extra_args = [['-whitelist=127.0.0.1', | self.extra_args = [['-whitelist=127.0.0.1', | ||||
"-gravitonactivationtime={}".format(GRAVITON_START_TIME)]] | "-gravitonactivationtime={}".format(GRAVITON_START_TIME)]] | ||||
def run_test(self): | def run_test(self): | ||||
self.address = self.nodes[0].getnewaddress() | self.address = self.nodes[0].getnewaddress() | ||||
self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address])[ | self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address])[ | ||||
'address'] | 'address'] | ||||
network_thread_start() | |||||
# Block 2 | # Block 2 | ||||
self.coinbase_blocks = self.nodes[0].generate(2) | self.coinbase_blocks = self.nodes[0].generate(2) | ||||
coinbase_txid = [] | coinbase_txid = [] | ||||
for i in self.coinbase_blocks: | for i in self.coinbase_blocks: | ||||
coinbase_txid.append(self.nodes[0].getblock(i)['tx'][0]) | coinbase_txid.append(self.nodes[0].getblock(i)['tx'][0]) | ||||
# Block 429 | # Block 429 | ||||
self.nodes[0].generate(427) | self.nodes[0].generate(427) | ||||
self.lastblockhash = self.nodes[0].getbestblockhash() | self.lastblockhash = self.nodes[0].getbestblockhash() | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |