From 2b650e790369edc4bbfa7a6116e511990e1013bc Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 27 Jan 2023 18:29:31 +0100 Subject: [PATCH 01/14] Adds rollback decorator --- .../test_framework/test_framework.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 1ba5ee5a4e..37d886eae2 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -102,6 +102,20 @@ def __init__(self): assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()" + @classmethod + def rollback(cls, func): + def wrapper(self, *args, **kwargs): + init_height = self.nodes[0].getblockcount() + init_data = self._get_chain_data() + result = func(self, *args, **kwargs) + self.rollback_to(init_height) + final_data = self._get_chain_data() + final_height = self.nodes[0].getblockcount() + assert(init_data == final_data) + assert(init_height == final_height) + return result + return wrapper + def main(self): """Main function. This should not be overridden by the subclass test scripts.""" @@ -423,6 +437,21 @@ def rollback_to(self, block, nodes=None): for node in nodes: self._rollback_to(block, node=node) + def _get_chain_data(self): + return [ + self.nodes[0].logaccountbalances(), + self.nodes[0].logstoredinterests(), + self.nodes[0].listvaults(), + self.nodes[0].listtokens(), + self.nodes[0].listgovs(), + self.nodes[0].listmasternodes(), + self.nodes[0].listaccounthistory(), + self.nodes[0].getburninfo(), + self.nodes[0].getloaninfo(), + self.nodes[0].listanchors(), + self.nodes[0].listgovproposals() + ] + def run_test(self): """Tests must override this method to define test logic""" raise NotImplementedError From ba8b4b6153d75949bc64e6217c15f446762d114a Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 27 Jan 2023 18:30:32 +0100 Subject: [PATCH 02/14] Sets decorator in main tests. Commiting for testing CI. --- test/functional/create_cache.py | 1 + test/functional/example_block_hash.py | 1 + test/functional/example_test.py | 1 + test/functional/feature_abortnode.py | 1 + test/functional/feature_account_mining.py | 1 + test/functional/feature_accounts_n_utxos.py | 1 + test/functional/feature_accounts_validation.py | 1 + test/functional/feature_anchor_rewards.py | 1 + test/functional/feature_anchorauths_pruning.py | 1 + test/functional/feature_any_accounts_to_accounts.py | 1 + test/functional/feature_assumevalid.py | 1 + test/functional/feature_asymmetric_fee.py | 1 + test/functional/feature_auth_return_change.py | 1 + test/functional/feature_autoauth.py | 1 + test/functional/feature_bip68_sequence.py | 1 + test/functional/feature_bitcoin_htlc.py | 1 + test/functional/feature_bitcoin_wallet.py | 1 + test/functional/feature_block.py | 1 + test/functional/feature_block_reward.py | 1 + test/functional/feature_blocksdir.py | 1 + test/functional/feature_burn_address.py | 1 + test/functional/feature_checkpoint.py | 1 + test/functional/feature_cltv.py | 1 + test/functional/feature_commission_fix.py | 1 + test/functional/feature_community_development_funds.py | 1 + test/functional/feature_communitybalance_reorg.py | 1 + test/functional/feature_config_args.py | 1 + test/functional/feature_consortium.py | 1 + test/functional/feature_csv_activation.py | 1 + test/functional/feature_custom_poolreward.py | 1 + test/functional/feature_dbcrash.py | 1 + test/functional/feature_dersig.py | 1 + test/functional/feature_dfip8_communitybalances.py | 1 + test/functional/feature_dip1.py | 1 + test/functional/feature_dusd_loans.py | 1 + test/functional/feature_eunos_balances.py | 1 + test/functional/feature_fee_estimation.py | 1 + test/functional/feature_filelock.py | 1 + test/functional/feature_foundation_migration.py | 1 + test/functional/feature_futures.py | 1 + test/functional/feature_help.py | 1 + test/functional/feature_higher_collateral_factor.py | 1 + test/functional/feature_icx_orderbook.py | 1 + test/functional/feature_icx_orderbook_errors.py | 1 + test/functional/feature_includeconf.py | 1 + test/functional/feature_initdist.py | 1 + test/functional/feature_jellyfish_initial_funds.py | 1 + test/functional/feature_listaccounthistory_multiaccountquery.py | 1 + test/functional/feature_listaccounts_pagination.py | 1 + test/functional/feature_loan.py | 1 + test/functional/feature_loan_auctions.py | 1 + test/functional/feature_loan_basics.py | 1 + test/functional/feature_loan_deposittovault.py | 1 + test/functional/feature_loan_dusd_as_collateral.py | 1 + test/functional/feature_loan_estimatecollateral.py | 1 + test/functional/feature_loan_estimateloan.py | 1 + test/functional/feature_loan_get_interest.py | 1 + test/functional/feature_loan_interest.py | 1 + test/functional/feature_loan_listauctions.py | 1 + test/functional/feature_loan_low_interest.py | 1 + test/functional/feature_loan_payback_dfi.py | 1 + test/functional/feature_loan_payback_dfi_v2.py | 1 + test/functional/feature_loan_payback_with_collateral.py | 1 + test/functional/feature_loan_priceupdate.py | 1 + test/functional/feature_loan_scheme.py | 1 + test/functional/feature_loan_setcollateraltoken.py | 1 + test/functional/feature_loan_setloantoken.py | 1 + test/functional/feature_loan_vault.py | 1 + test/functional/feature_loan_vaultstate.py | 1 + test/functional/feature_lock_unspends.py | 1 + test/functional/feature_logging.py | 1 + test/functional/feature_longterm_lockin.py | 1 + test/functional/feature_masternode_operator.py | 1 + test/functional/feature_maxuploadtarget.py | 1 + test/functional/feature_median_time.py | 1 + test/functional/feature_mempool_dakota.py | 1 + test/functional/feature_migrate_v1_in_futures.py | 1 + test/functional/feature_minchainwork.py | 1 + test/functional/feature_mine_cached.py | 1 + test/functional/feature_negative_interest.py | 1 + test/functional/feature_negative_loan_interest.py | 1 + test/functional/feature_notifications.py | 1 + test/functional/feature_nulldummy.py | 1 + test/functional/feature_on_chain_government.py | 1 + test/functional/feature_on_chain_government_fee_distribution.py | 1 + test/functional/feature_on_chain_government_govvar_update.py | 1 + .../feature_on_chain_government_voting_period_alignment.py | 1 + test/functional/feature_oracles.py | 1 + test/functional/feature_poolpair.py | 1 + test/functional/feature_poolpair_liquidity.py | 1 + test/functional/feature_poolswap.py | 1 + test/functional/feature_poolswap_composite.py | 1 + test/functional/feature_poolswap_mainnet.py | 1 + test/functional/feature_poolswap_mechanism.py | 1 + test/functional/feature_prevent_bad_tx_propagation.py | 1 + test/functional/feature_proxy.py | 1 + test/functional/feature_pruning.py | 1 + test/functional/feature_rbf.py | 1 + test/functional/feature_reindex.py | 1 + test/functional/feature_reject_customtxs.py | 1 + test/functional/feature_restore_utxo.py | 1 + test/functional/feature_rpcstats.py | 1 + test/functional/feature_segwit.py | 1 + test/functional/feature_sendtokenstoaddress.py | 1 + test/functional/feature_sendutxosfrom.py | 1 + test/functional/feature_setgov.py | 1 + test/functional/feature_shutdown.py | 1 + test/functional/feature_skip_collateral_factor_check.py | 1 + test/functional/feature_smart_contracts.py | 1 + test/functional/feature_split_migrate_lock.py | 1 + test/functional/feature_stored_interest.py | 1 + test/functional/feature_testpoolswap.py | 1 + test/functional/feature_token_fork.py | 1 + test/functional/feature_token_lock.py | 1 + test/functional/feature_token_merge.py | 1 + test/functional/feature_token_merge_usd_value.py | 1 + test/functional/feature_token_split.py | 1 + test/functional/feature_token_split_mechanism.py | 1 + test/functional/feature_token_split_usd_value.py | 1 + test/functional/feature_tokens_basic.py | 1 + test/functional/feature_tokens_dat.py | 1 + test/functional/feature_tokens_minting.py | 1 + test/functional/feature_tokens_multisig.py | 1 + test/functional/feature_uacomment.py | 1 + test/functional/feature_update_mn.py | 1 + test/functional/feature_vault_pct_check_factor.py | 1 + test/functional/feature_versionbits_warning.py | 1 + test/functional/interface_defi_cli.py | 1 + test/functional/interface_http.py | 1 + test/functional/interface_http_cors.py | 1 + test/functional/interface_rest.py | 1 + test/functional/interface_rpc.py | 1 + test/functional/interface_zmq.py | 1 + test/functional/mempool_accept.py | 1 + test/functional/mempool_limit.py | 1 + test/functional/mempool_package_onemore.py | 1 + test/functional/mempool_packages.py | 1 + test/functional/mempool_persist.py | 1 + test/functional/mempool_reorg.py | 1 + test/functional/mempool_resurrect.py | 1 + test/functional/mempool_spend_coinbase.py | 1 + test/functional/mining_basic.py | 1 + test/functional/mining_getblocktemplate_longpoll.py | 1 + test/functional/mining_prioritisetransaction.py | 1 + test/functional/p2p_blocksonly.py | 1 + test/functional/p2p_compactblocks.py | 1 + test/functional/p2p_disconnect_ban.py | 1 + test/functional/p2p_feefilter.py | 1 + test/functional/p2p_fingerprint.py | 1 + test/functional/p2p_invalid_block.py | 1 + test/functional/p2p_invalid_locator.py | 1 + test/functional/p2p_invalid_messages.py | 1 + test/functional/p2p_invalid_tx.py | 1 + test/functional/p2p_leak.py | 1 + test/functional/p2p_leak_tx.py | 1 + test/functional/p2p_mempool.py | 1 + test/functional/p2p_node_network_limited.py | 1 + test/functional/p2p_permissions.py | 1 + test/functional/p2p_segwit.py | 1 + test/functional/p2p_segwit2.py | 1 + test/functional/p2p_sendheaders.py | 1 + test/functional/p2p_timeouts.py | 1 + test/functional/p2p_tx_download.py | 1 + test/functional/p2p_unrequested_blocks.py | 1 + test/functional/rpc_bind.py | 1 + test/functional/rpc_blockchain.py | 1 + test/functional/rpc_createmultisig.py | 1 + test/functional/rpc_decodescript.py | 1 + test/functional/rpc_deprecated.py | 1 + test/functional/rpc_deriveaddresses.py | 1 + test/functional/rpc_fundrawtransaction.py | 1 + test/functional/rpc_getaccounthistory.py | 1 + test/functional/rpc_getblockfilter.py | 1 + test/functional/rpc_getblockstats.py | 1 + test/functional/rpc_getchaintips.py | 1 + test/functional/rpc_getcustomtx.py | 1 + test/functional/rpc_getmininginfo.py | 1 + test/functional/rpc_getstoredinterest.py | 1 + test/functional/rpc_help.py | 1 + test/functional/rpc_invalidateblock.py | 1 + test/functional/rpc_listaccounthistory.py | 1 + test/functional/rpc_listgovproposals.py | 1 + test/functional/rpc_listvaulthistory.py | 1 + test/functional/rpc_misc.py | 1 + test/functional/rpc_mn_basic.py | 1 + test/functional/rpc_named_arguments.py | 1 + test/functional/rpc_net.py | 1 + test/functional/rpc_preciousblock.py | 1 + test/functional/rpc_psbt.py | 1 + test/functional/rpc_rawtransaction.py | 1 + test/functional/rpc_scantxoutset.py | 1 + test/functional/rpc_setban.py | 1 + test/functional/rpc_signmessage.py | 1 + test/functional/rpc_signrawtransaction.py | 1 + test/functional/rpc_txoutproof.py | 1 + test/functional/rpc_updatemasternode.py | 1 + test/functional/rpc_uptime.py | 1 + test/functional/rpc_users.py | 1 + test/functional/tool_wallet.py | 1 + test/functional/wallet_abandonconflict.py | 1 + test/functional/wallet_address_types.py | 1 + test/functional/wallet_avoidreuse.py | 1 + test/functional/wallet_backup.py | 1 + test/functional/wallet_balance.py | 1 + test/functional/wallet_basic.py | 1 + test/functional/wallet_bumpfee.py | 1 + test/functional/wallet_bumpfee_totalfee_deprecation.py | 1 + test/functional/wallet_coinbase_category.py | 1 + test/functional/wallet_create_tx.py | 1 + test/functional/wallet_createwallet.py | 1 + test/functional/wallet_dump.py | 1 + test/functional/wallet_encryption.py | 1 + test/functional/wallet_fallbackfee.py | 1 + test/functional/wallet_groups.py | 1 + test/functional/wallet_hd.py | 1 + test/functional/wallet_import_rescan.py | 1 + test/functional/wallet_import_with_label.py | 1 + test/functional/wallet_importmulti.py | 1 + test/functional/wallet_importprunedfunds.py | 1 + test/functional/wallet_keypool.py | 1 + test/functional/wallet_keypool_topup.py | 1 + test/functional/wallet_labels.py | 1 + test/functional/wallet_listreceivedby.py | 1 + test/functional/wallet_listsinceblock.py | 1 + test/functional/wallet_listtransactions.py | 1 + test/functional/wallet_multiwallet.py | 1 + test/functional/wallet_resendwallettransactions.py | 1 + test/functional/wallet_txn_clone.py | 1 + test/functional/wallet_txn_doublespend.py | 1 + test/functional/wallet_watchonly.py | 1 + test/functional/wallet_zapwallettxes.py | 1 + 231 files changed, 231 insertions(+) diff --git a/test/functional/create_cache.py b/test/functional/create_cache.py index 2ca5e85572..958edd7fdc 100755 --- a/test/functional/create_cache.py +++ b/test/functional/create_cache.py @@ -21,6 +21,7 @@ def set_test_params(self): def setup_network(self): pass + @DefiTestFramework.rollback def run_test(self): pass diff --git a/test/functional/example_block_hash.py b/test/functional/example_block_hash.py index 7cde114995..a205a79e14 100755 --- a/test/functional/example_block_hash.py +++ b/test/functional/example_block_hash.py @@ -14,6 +14,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 7df9ece02d..92eaaa0ad8 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -133,6 +133,7 @@ def custom_method(self): self.log.info("Running custom_method") + @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/feature_abortnode.py b/test/functional/feature_abortnode.py index 21eca724d9..43a13ff21c 100755 --- a/test/functional/feature_abortnode.py +++ b/test/functional/feature_abortnode.py @@ -24,6 +24,7 @@ def setup_network(self): self.setup_nodes() # We'll connect the nodes later + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(3) datadir = get_datadir_path(self.options.tmpdir, 0) diff --git a/test/functional/feature_account_mining.py b/test/functional/feature_account_mining.py index bee7633ff1..a5dbc2d0af 100755 --- a/test/functional/feature_account_mining.py +++ b/test/functional/feature_account_mining.py @@ -19,6 +19,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50']] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_accounts_n_utxos.py b/test/functional/feature_accounts_n_utxos.py index 2877d56938..6902d85e2d 100755 --- a/test/functional/feature_accounts_n_utxos.py +++ b/test/functional/feature_accounts_n_utxos.py @@ -23,6 +23,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_accounts_validation.py b/test/functional/feature_accounts_validation.py index c3cc12547c..05baa8e936 100755 --- a/test/functional/feature_accounts_validation.py +++ b/test/functional/feature_accounts_validation.py @@ -17,6 +17,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_anchor_rewards.py b/test/functional/feature_anchor_rewards.py index f4d39c5493..d104367ec7 100755 --- a/test/functional/feature_anchor_rewards.py +++ b/test/functional/feature_anchor_rewards.py @@ -82,6 +82,7 @@ def authsquorum(self, height, node=None): return True return False + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) diff --git a/test/functional/feature_anchorauths_pruning.py b/test/functional/feature_anchorauths_pruning.py index 3c7e30036a..d3737e6f0e 100755 --- a/test/functional/feature_anchorauths_pruning.py +++ b/test/functional/feature_anchorauths_pruning.py @@ -27,6 +27,7 @@ def genmocktime(self, time, intervals): self.nodes[0].set_mocktime(time + (i * 60 * 60)) self.nodes[0].generate(5) + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) diff --git a/test/functional/feature_any_accounts_to_accounts.py b/test/functional/feature_any_accounts_to_accounts.py index 2d2a15662b..70064f1372 100755 --- a/test/functional/feature_any_accounts_to_accounts.py +++ b/test/functional/feature_any_accounts_to_accounts.py @@ -31,6 +31,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'] ] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index dbaae784a8..93c9217808 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -94,6 +94,7 @@ def assert_blockchain_height(self, node, height): elif current_height == height: break + @DefiTestFramework.rollback def run_test(self): p2p0 = self.nodes[0].add_p2p_connection(BaseNode()) diff --git a/test/functional/feature_asymmetric_fee.py b/test/functional/feature_asymmetric_fee.py index a36695fd5e..1d53e26559 100755 --- a/test/functional/feature_asymmetric_fee.py +++ b/test/functional/feature_asymmetric_fee.py @@ -18,6 +18,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningspringheight=150', '-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): # Set up test tokens diff --git a/test/functional/feature_auth_return_change.py b/test/functional/feature_auth_return_change.py index 529a1c5e44..93346ccf4b 100755 --- a/test/functional/feature_auth_return_change.py +++ b/test/functional/feature_auth_return_change.py @@ -43,6 +43,7 @@ def check_auto_auth_txs(self, tx, owner, outputs = 2): assert_equal(len(final_rawtx['vout']), outputs) assert_equal(len(final_rawtx['vin']), 1) + @DefiTestFramework.rollback def run_test(self): coinbase = self.nodes[0].getnewaddress("", "legacy") self.nodes[0].generate(101, 1000000, coinbase) diff --git a/test/functional/feature_autoauth.py b/test/functional/feature_autoauth.py index 3ae48c729d..7913624e3e 100755 --- a/test/functional/feature_autoauth.py +++ b/test/functional/feature_autoauth.py @@ -26,6 +26,7 @@ def clear_auth_utxos(self): self.nodes[0].sendtoaddress(non_auth_address, balance - Decimal("0.1")) # 0.1 to cover fee self.nodes[0].generate(1, 1000000, non_auth_address) + @DefiTestFramework.rollback def run_test(self): n0 = self.nodes[0] diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py index 0f969016cf..58b59300cf 100755 --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -37,6 +37,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] diff --git a/test/functional/feature_bitcoin_htlc.py b/test/functional/feature_bitcoin_htlc.py index 85fd866582..1b78157cf6 100755 --- a/test/functional/feature_bitcoin_htlc.py +++ b/test/functional/feature_bitcoin_htlc.py @@ -20,6 +20,7 @@ def set_test_params(self): ] self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): # Set up wallet address = self.nodes[0].spv_getnewaddress() diff --git a/test/functional/feature_bitcoin_wallet.py b/test/functional/feature_bitcoin_wallet.py index ee443b55b0..a3af4f35a6 100755 --- a/test/functional/feature_bitcoin_wallet.py +++ b/test/functional/feature_bitcoin_wallet.py @@ -19,6 +19,7 @@ def set_test_params(self): ] self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): # Set up wallet self.nodes[0].spv_setlastheight(1) diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 7a421a4df0..56a1e386d3 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -84,6 +84,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-acceptnonstdtxn=1']] # This is a consensus block test, we don't care about tx policy + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/feature_block_reward.py b/test/functional/feature_block_reward.py index 8f0865061f..4d125a14d3 100755 --- a/test/functional/feature_block_reward.py +++ b/test/functional/feature_block_reward.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-eunosheight=100', '-eunosheight=100', '-fortcanningheight=110', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_blocksdir.py b/test/functional/feature_blocksdir.py index 00be05819a..f07a521dac 100755 --- a/test/functional/feature_blocksdir.py +++ b/test/functional/feature_blocksdir.py @@ -16,6 +16,7 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): self.stop_node(0) assert os.path.isdir(os.path.join(self.nodes[0].datadir, self.chain, "blocks")) diff --git a/test/functional/feature_burn_address.py b/test/functional/feature_burn_address.py index 3d68f1ebd3..7e28bad8a2 100755 --- a/test/functional/feature_burn_address.py +++ b/test/functional/feature_burn_address.py @@ -18,6 +18,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=1', '-dakotaheight=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_checkpoint.py b/test/functional/feature_checkpoint.py index b499d97e88..84d3d65f26 100755 --- a/test/functional/feature_checkpoint.py +++ b/test/functional/feature_checkpoint.py @@ -20,6 +20,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(100) self.sync_blocks() diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py index 35fe96bf10..3c42ce975e 100755 --- a/test/functional/feature_cltv.py +++ b/test/functional/feature_cltv.py @@ -68,6 +68,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/feature_commission_fix.py b/test/functional/feature_commission_fix.py index 1e5b64f448..05a47e27ce 100644 --- a/test/functional/feature_commission_fix.py +++ b/test/functional/feature_commission_fix.py @@ -19,6 +19,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1', f'-grandcentralheight={self.grand_central}', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): # Set up test tokens self.setup_test_tokens() diff --git a/test/functional/feature_community_development_funds.py b/test/functional/feature_community_development_funds.py index 6e32a72780..112ac2ffb9 100755 --- a/test/functional/feature_community_development_funds.py +++ b/test/functional/feature_community_development_funds.py @@ -23,6 +23,7 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=60', '-eunosheight=70', '-fortcanningheight=80', '-fortcanninghillheight=90', '-fortcanningroadheight=100', '-fortcanningcrunchheight=110', '-fortcanningspringheight=120', '-fortcanninggreatworldheight=130', '-grandcentralheight=201', '-subsidytest=1'], ] + @DefiTestFramework.rollback def run_test(self): node0 = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_communitybalance_reorg.py b/test/functional/feature_communitybalance_reorg.py index b983376650..fc7c001a9a 100755 --- a/test/functional/feature_communitybalance_reorg.py +++ b/test/functional/feature_communitybalance_reorg.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=0'], ['-txnotokens=0', '-amkheight=0']] + @DefiTestFramework.rollback def run_test(self): # Generate across nodes self.nodes[0].generate(10) diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py index a791db22ce..0b601cca34 100755 --- a/test/functional/feature_config_args.py +++ b/test/functional/feature_config_args.py @@ -82,6 +82,7 @@ def test_log_buffer(self): self.start_node(0, extra_args=['-noconnect=0']) self.stop_node(0) + @DefiTestFramework.rollback def run_test(self): self.stop_node(0) diff --git a/test/functional/feature_consortium.py b/test/functional/feature_consortium.py index 0aa3180897..dd5db4c2ce 100644 --- a/test/functional/feature_consortium.py +++ b/test/functional/feature_consortium.py @@ -20,6 +20,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): print("Generating initial chain...") diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py index 4d0c11cd7d..6f3766e275 100755 --- a/test/functional/feature_csv_activation.py +++ b/test/functional/feature_csv_activation.py @@ -168,6 +168,7 @@ def send_blocks(self, blocks, success=True): Call with success = False if the tip shouldn't advance to the most recent block.""" self.nodes[0].p2p.send_blocks_and_test(blocks, self.nodes[0], success=success) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PDataStore()) diff --git a/test/functional/feature_custom_poolreward.py b/test/functional/feature_custom_poolreward.py index 5aa5fe696b..b70077006f 100755 --- a/test/functional/feature_custom_poolreward.py +++ b/test/functional/feature_custom_poolreward.py @@ -17,6 +17,7 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-clarkequayheight=50'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-clarkequayheight=50']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(102) self.sync_blocks() diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py index 3a4051cb40..9b184433f5 100755 --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -212,6 +212,7 @@ def generate_small_transactions(self, node, count, utxo_list): node.sendrawtransaction(tx_signed_hex) num_transactions += 1 + @DefiTestFramework.rollback def run_test(self): # Track test coverage statistics self.restart_counts = [0, 0, 0] # Track the restarts for nodes 0-2 diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py index 4903bdcec2..acd1052bc5 100755 --- a/test/functional/feature_dersig.py +++ b/test/functional/feature_dersig.py @@ -51,6 +51,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/feature_dfip8_communitybalances.py b/test/functional/feature_dfip8_communitybalances.py index 64532ebe6c..5ffb60aba8 100755 --- a/test/functional/feature_dfip8_communitybalances.py +++ b/test/functional/feature_dfip8_communitybalances.py @@ -16,6 +16,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=1', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1) diff --git a/test/functional/feature_dip1.py b/test/functional/feature_dip1.py index df211c41a3..c22b8ec0c0 100755 --- a/test/functional/feature_dip1.py +++ b/test/functional/feature_dip1.py @@ -24,6 +24,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=2'], ['-txnotokens=0']] + @DefiTestFramework.rollback def run_test(self): assert_equal(self.nodes[0].getblockchaininfo()['softforks']['amk']['active'], False) diff --git a/test/functional/feature_dusd_loans.py b/test/functional/feature_dusd_loans.py index 65c47cfd0d..ee9635b938 100755 --- a/test/functional/feature_dusd_loans.py +++ b/test/functional/feature_dusd_loans.py @@ -510,6 +510,7 @@ def post_FCE_DFI_minimum_check_takeloan(self): + @DefiTestFramework.rollback def run_test(self): # Initial set up self.setup() diff --git a/test/functional/feature_eunos_balances.py b/test/functional/feature_eunos_balances.py index 6432550820..3d07dac142 100755 --- a/test/functional/feature_eunos_balances.py +++ b/test/functional/feature_eunos_balances.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=200', '-dakotaheight=1']] + @DefiTestFramework.rollback def run_test(self): # Burn address diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py index 820658db2e..bc62ba458b 100755 --- a/test/functional/feature_fee_estimation.py +++ b/test/functional/feature_fee_estimation.py @@ -181,6 +181,7 @@ def transact_and_mine(self, numblocks, mining_node): newmem.append(utx) self.memutxo = newmem + @DefiTestFramework.rollback def run_test(self): self.log.info("This test is time consuming, please be patient") self.log.info("Splitting inputs so we can generate tx's") diff --git a/test/functional/feature_filelock.py b/test/functional/feature_filelock.py index fdff409386..0f9f6475a9 100755 --- a/test/functional/feature_filelock.py +++ b/test/functional/feature_filelock.py @@ -18,6 +18,7 @@ def setup_network(self): self.nodes[0].start([]) self.nodes[0].wait_for_rpc_connection() + @DefiTestFramework.rollback def run_test(self): datadir = os.path.join(self.nodes[0].datadir, 'regtest') self.log.info("Using datadir {}".format(datadir)) diff --git a/test/functional/feature_foundation_migration.py b/test/functional/feature_foundation_migration.py index 54fe845424..79267dd9bc 100755 --- a/test/functional/feature_foundation_migration.py +++ b/test/functional/feature_foundation_migration.py @@ -19,6 +19,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1', f'-grandcentralheight={self.grand_central}', '-subsidytest=1'] ] + @DefiTestFramework.rollback def run_test(self): # Define node 0 foundation address diff --git a/test/functional/feature_futures.py b/test/functional/feature_futures.py index f9cb2805b4..41bc7ee2c1 100755 --- a/test/functional/feature_futures.py +++ b/test/functional/feature_futures.py @@ -20,6 +20,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=150', '-fortcanningroadheight=150', '-fortcanningspringheight=500', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_help.py b/test/functional/feature_help.py index 52f2ad4951..a7bc090cbf 100755 --- a/test/functional/feature_help.py +++ b/test/functional/feature_help.py @@ -34,6 +34,7 @@ def get_node_output(self, *, ret_code_expected): return out, err + @DefiTestFramework.rollback def run_test(self): self.log.info("Start defi with -h for help text") self.nodes[0].start(extra_args=['-h']) diff --git a/test/functional/feature_higher_collateral_factor.py b/test/functional/feature_higher_collateral_factor.py index 8fa8b56582..9453f83b2b 100755 --- a/test/functional/feature_higher_collateral_factor.py +++ b/test/functional/feature_higher_collateral_factor.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanningroadheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=200', '-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): # Setup self.setup() diff --git a/test/functional/feature_icx_orderbook.py b/test/functional/feature_icx_orderbook.py index 3998b51782..8edefae42e 100755 --- a/test/functional/feature_icx_orderbook.py +++ b/test/functional/feature_icx_orderbook.py @@ -19,6 +19,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_icx_orderbook_errors.py b/test/functional/feature_icx_orderbook_errors.py index 1a580a67ca..5280992d9e 100755 --- a/test/functional/feature_icx_orderbook_errors.py +++ b/test/functional/feature_icx_orderbook_errors.py @@ -21,6 +21,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py index 427141bbc4..b435e50cfa 100755 --- a/test/functional/feature_includeconf.py +++ b/test/functional/feature_includeconf.py @@ -35,6 +35,7 @@ def setup_chain(self): with open(os.path.join(self.options.tmpdir, "node0", "defi.conf"), "a", encoding='utf8') as f: f.write("uacomment=main\nincludeconf=relative.conf\n") + @DefiTestFramework.rollback def run_test(self): self.log.info("-includeconf works from config file. subversion should end with 'main; relative)/'") diff --git a/test/functional/feature_initdist.py b/test/functional/feature_initdist.py index 2a8593bf4e..cd576a0a4e 100755 --- a/test/functional/feature_initdist.py +++ b/test/functional/feature_initdist.py @@ -31,6 +31,7 @@ def setup_network(self): connect_nodes_bi(self.nodes, i, i + 1) self.sync_blocks() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].importprivkey(privkey=self.nodes[0].PRIV_KEYS[5].ownerPrivKey, label='initdist') diff --git a/test/functional/feature_jellyfish_initial_funds.py b/test/functional/feature_jellyfish_initial_funds.py index 5611a134a9..043467347d 100755 --- a/test/functional/feature_jellyfish_initial_funds.py +++ b/test/functional/feature_jellyfish_initial_funds.py @@ -18,6 +18,7 @@ def set_test_params(self): # pass -jellyfish_regtest=1 option to enable regtest params required for jellyfish test containers self.extra_args = [['-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # generate one block diff --git a/test/functional/feature_listaccounthistory_multiaccountquery.py b/test/functional/feature_listaccounthistory_multiaccountquery.py index 7feb67a39a..826721768d 100644 --- a/test/functional/feature_listaccounthistory_multiaccountquery.py +++ b/test/functional/feature_listaccounthistory_multiaccountquery.py @@ -20,6 +20,7 @@ def set_test_params(self): '-grandcentralheight=51'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/feature_listaccounts_pagination.py b/test/functional/feature_listaccounts_pagination.py index dfdad8b4f2..523b1a0246 100755 --- a/test/functional/feature_listaccounts_pagination.py +++ b/test/functional/feature_listaccounts_pagination.py @@ -16,6 +16,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_loan.py b/test/functional/feature_loan.py index aa689026c9..43f1d11824 100755 --- a/test/functional/feature_loan.py +++ b/test/functional/feature_loan.py @@ -23,6 +23,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(300) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_auctions.py b/test/functional/feature_loan_auctions.py index 035dbf0c78..259207d47c 100755 --- a/test/functional/feature_loan_auctions.py +++ b/test/functional/feature_loan_auctions.py @@ -21,6 +21,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(500) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_basics.py b/test/functional/feature_loan_basics.py index 9f4e024acd..7361532c99 100755 --- a/test/functional/feature_loan_basics.py +++ b/test/functional/feature_loan_basics.py @@ -22,6 +22,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=220', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_deposittovault.py b/test/functional/feature_loan_deposittovault.py index c2ba7f67a3..9b51682e6f 100755 --- a/test/functional/feature_loan_deposittovault.py +++ b/test/functional/feature_loan_deposittovault.py @@ -21,6 +21,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] + @DefiTestFramework.rollback def run_test(self): # Prepare tokens for deposittoloan assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_dusd_as_collateral.py b/test/functional/feature_loan_dusd_as_collateral.py index e7acb6d100..6ba4c9d77b 100755 --- a/test/functional/feature_loan_dusd_as_collateral.py +++ b/test/functional/feature_loan_dusd_as_collateral.py @@ -19,6 +19,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=200', '-fortcanningroadheight=215', '-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(120) diff --git a/test/functional/feature_loan_estimatecollateral.py b/test/functional/feature_loan_estimatecollateral.py index 26bfb28c0a..e8bdd19dff 100755 --- a/test/functional/feature_loan_estimatecollateral.py +++ b/test/functional/feature_loan_estimatecollateral.py @@ -19,6 +19,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_loan_estimateloan.py b/test/functional/feature_loan_estimateloan.py index fc3d092011..8ad6999317 100755 --- a/test/functional/feature_loan_estimateloan.py +++ b/test/functional/feature_loan_estimateloan.py @@ -19,6 +19,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(125) diff --git a/test/functional/feature_loan_get_interest.py b/test/functional/feature_loan_get_interest.py index 724baa3cf1..edba29ea3b 100755 --- a/test/functional/feature_loan_get_interest.py +++ b/test/functional/feature_loan_get_interest.py @@ -109,6 +109,7 @@ def setup(self): {self.account0: ["30@" + self.symbolDFI, "300@" + self.symboldUSD]}, self.account0) self.nodes[0].generate(1) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_interest.py b/test/functional/feature_loan_interest.py index b7cca760eb..aa581ddd86 100755 --- a/test/functional/feature_loan_interest.py +++ b/test/functional/feature_loan_interest.py @@ -22,6 +22,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanningmuseumheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanningmuseumheight=50', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_listauctions.py b/test/functional/feature_loan_listauctions.py index a34c7b918f..5d443d8e6b 100755 --- a/test/functional/feature_loan_listauctions.py +++ b/test/functional/feature_loan_listauctions.py @@ -20,6 +20,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(400) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_low_interest.py b/test/functional/feature_loan_low_interest.py index cabcdcd8e3..3473e9713b 100755 --- a/test/functional/feature_loan_low_interest.py +++ b/test/functional/feature_loan_low_interest.py @@ -407,6 +407,7 @@ def test_new_loan_with_interest_over_1satoshi_pre_post_fork(self, payback=True): + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_payback_dfi.py b/test/functional/feature_loan_payback_dfi.py index 8695dc48cd..7fc571b681 100755 --- a/test/functional/feature_loan_payback_dfi.py +++ b/test/functional/feature_loan_payback_dfi.py @@ -23,6 +23,7 @@ def set_test_params(self): '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningroadheight=196', '-fortcanningspringheight=200', '-debug=loan', '-txindex=1'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_loan_payback_dfi_v2.py b/test/functional/feature_loan_payback_dfi_v2.py index 50f443845d..9a85498b8d 100755 --- a/test/functional/feature_loan_payback_dfi_v2.py +++ b/test/functional/feature_loan_payback_dfi_v2.py @@ -830,6 +830,7 @@ def multipayback_DUSD_with_DFI_and_DUSD_Pre_FCR(self): assert_equal(Decimal(balanceDFIBefore) - Decimal(balanceDFIAfter), Decimal('10')) + @DefiTestFramework.rollback def run_test(self): self.setup(FCR=True) self.payback_DUSD_with_BTC() diff --git a/test/functional/feature_loan_payback_with_collateral.py b/test/functional/feature_loan_payback_with_collateral.py index 076cb5805f..97c2713fe7 100755 --- a/test/functional/feature_loan_payback_with_collateral.py +++ b/test/functional/feature_loan_payback_with_collateral.py @@ -555,6 +555,7 @@ def test_negative_interest_loans_greater_than_collaterals(self, payback_with_col self.rollback_to(height) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_priceupdate.py b/test/functional/feature_loan_priceupdate.py index 1d2b3ed2b3..fc8302dbaf 100755 --- a/test/functional/feature_loan_priceupdate.py +++ b/test/functional/feature_loan_priceupdate.py @@ -23,6 +23,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', f'-fortcanninghillheight={self.FCH}'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(300) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_scheme.py b/test/functional/feature_loan_scheme.py index eb7458367c..8fae471903 100755 --- a/test/functional/feature_loan_scheme.py +++ b/test/functional/feature_loan_scheme.py @@ -20,6 +20,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=110'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_loan_setcollateraltoken.py b/test/functional/feature_loan_setcollateraltoken.py index 1a63402686..5c1ad3e5ae 100755 --- a/test/functional/feature_loan_setcollateraltoken.py +++ b/test/functional/feature_loan_setcollateraltoken.py @@ -21,6 +21,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningcrunchheight=150', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_setloantoken.py b/test/functional/feature_loan_setloantoken.py index a13d455b0f..746fb847a1 100755 --- a/test/functional/feature_loan_setloantoken.py +++ b/test/functional/feature_loan_setloantoken.py @@ -21,6 +21,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningcrunchheight=110', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_vault.py b/test/functional/feature_loan_vault.py index ab5fe3cb87..3a7a24b35f 100755 --- a/test/functional/feature_loan_vault.py +++ b/test/functional/feature_loan_vault.py @@ -944,6 +944,7 @@ def loan_and_collateral_token_to_govvar(self): assert_equal(result[f'v0/token/{self.idAAPL}/loan_minting_enabled'], 'true') assert_equal(result[f'v0/token/{self.idAAPL}/loan_minting_interest'], '1') + @DefiTestFramework.rollback def run_test(self): self.setup() self.createvault_with_invalid_parameters() diff --git a/test/functional/feature_loan_vaultstate.py b/test/functional/feature_loan_vaultstate.py index ecb913d5e3..a618e79ca9 100755 --- a/test/functional/feature_loan_vaultstate.py +++ b/test/functional/feature_loan_vaultstate.py @@ -21,6 +21,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1'] ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(500) self.nodes[0].createtoken({ diff --git a/test/functional/feature_lock_unspends.py b/test/functional/feature_lock_unspends.py index a45dfd4bf3..12cbc7d822 100755 --- a/test/functional/feature_lock_unspends.py +++ b/test/functional/feature_lock_unspends.py @@ -13,6 +13,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(105) account_address = self.nodes[0].getnewaddress("", "bech32") diff --git a/test/functional/feature_logging.py b/test/functional/feature_logging.py index 467d04355c..eb9f9fb79a 100755 --- a/test/functional/feature_logging.py +++ b/test/functional/feature_logging.py @@ -18,6 +18,7 @@ def set_test_params(self): def relative_log_path(self, name): return os.path.join(self.nodes[0].datadir, "regtest", name) + @DefiTestFramework.rollback def run_test(self): # test default log file name default_log_path = self.relative_log_path("debug.log") diff --git a/test/functional/feature_longterm_lockin.py b/test/functional/feature_longterm_lockin.py index d42f1d6e27..d3d95b4d40 100755 --- a/test/functional/feature_longterm_lockin.py +++ b/test/functional/feature_longterm_lockin.py @@ -19,6 +19,7 @@ def set_test_params(self): self.extra_args = [['-dummypos=0', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-dakotacrescentheight=1', '-eunosheight=1', '-eunospayaheight=140'], ['-dummypos=0', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-dakotacrescentheight=1', '-eunosheight=1', '-eunospayaheight=140']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_masternode_operator.py b/test/functional/feature_masternode_operator.py index 273057dcc3..51075ea8e9 100755 --- a/test/functional/feature_masternode_operator.py +++ b/test/functional/feature_masternode_operator.py @@ -17,6 +17,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node0_keys = self.nodes[0].get_genesis_keys() node1_keys = self.nodes[1].get_genesis_keys() diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py index 9ed0d035c2..f186b0efbf 100755 --- a/test/functional/feature_maxuploadtarget.py +++ b/test/functional/feature_maxuploadtarget.py @@ -45,6 +45,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Before we connect anything, we first set the time on the node # to be in the past, otherwise things break because the CNode diff --git a/test/functional/feature_median_time.py b/test/functional/feature_median_time.py index 18ce1da2f0..116bc868ab 100755 --- a/test/functional/feature_median_time.py +++ b/test/functional/feature_median_time.py @@ -31,6 +31,7 @@ def GenerateBlocks(self, blocks): self.nodes[0].set_mocktime(int(time.time()) + randint(10, 60)) self.nodes[0].generate(1) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(11) assert_equal(self.nodes[0].getblock(self.nodes[0].getblockhash(self.nodes[0].getblockcount()))['mediantime'], self.CalcMedianTime()) diff --git a/test/functional/feature_mempool_dakota.py b/test/functional/feature_mempool_dakota.py index b03a18428d..7fea6f3b4c 100755 --- a/test/functional/feature_mempool_dakota.py +++ b/test/functional/feature_mempool_dakota.py @@ -21,6 +21,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-dakotaheight=100'], ] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_migrate_v1_in_futures.py b/test/functional/feature_migrate_v1_in_futures.py index 7139fef531..d00fb453db 100755 --- a/test/functional/feature_migrate_v1_in_futures.py +++ b/test/functional/feature_migrate_v1_in_futures.py @@ -18,6 +18,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1']] + @DefiTestFramework.rollback def run_test(self): # Set up tokens diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py index 977214ee89..8198159557 100755 --- a/test/functional/feature_minchainwork.py +++ b/test/functional/feature_minchainwork.py @@ -41,6 +41,7 @@ def setup_network(self): for i in range(self.num_nodes-1): connect_nodes(self.nodes[i+1], i) + @DefiTestFramework.rollback def run_test(self): # Start building a chain on node0. node2 shouldn't be able to sync until node1's # minchainwork is exceeded diff --git a/test/functional/feature_mine_cached.py b/test/functional/feature_mine_cached.py index 546d045a6b..118445d20a 100755 --- a/test/functional/feature_mine_cached.py +++ b/test/functional/feature_mine_cached.py @@ -26,6 +26,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'], ] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_negative_interest.py b/test/functional/feature_negative_interest.py index 4da02842df..2d81690ba2 100755 --- a/test/functional/feature_negative_interest.py +++ b/test/functional/feature_negative_interest.py @@ -1006,6 +1006,7 @@ def various_payback_tests(self): [balanceDUSDafter, _] = self.nodes[0].getaccount(self.account)[0].split('@') assert_equal(Decimal(balanceDUSDafter), Decimal(balanceDUSDbefore) - Decimal('1.00000000')) + @DefiTestFramework.rollback def run_test(self): self.setup() self.vault_interest_zero() diff --git a/test/functional/feature_negative_loan_interest.py b/test/functional/feature_negative_loan_interest.py index 0529d8003a..b44a48efa9 100755 --- a/test/functional/feature_negative_loan_interest.py +++ b/test/functional/feature_negative_loan_interest.py @@ -19,6 +19,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=1','-jellyfish_regtest=1', '-simulatemainnet=1', '-negativeinterest=1']] + @DefiTestFramework.rollback def run_test(self): # Create tokens for tests self.setup_test_tokens() diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py index c6241d1b62..b4e9a7d2dc 100755 --- a/test/functional/feature_notifications.py +++ b/test/functional/feature_notifications.py @@ -32,6 +32,7 @@ def setup_network(self): "-walletnotify=echo > {}".format(os.path.join(self.walletnotify_dir, '%s'))]] super().setup_network() + @DefiTestFramework.rollback def run_test(self): self.log.info("test -blocknotify") block_count = 10 diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py index 6d6e3737aa..922ec90eda 100755 --- a/test/functional/feature_nulldummy.py +++ b/test/functional/feature_nulldummy.py @@ -44,6 +44,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.address = self.nodes[0].getnewaddress() self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address])['address'] diff --git a/test/functional/feature_on_chain_government.py b/test/functional/feature_on_chain_government.py index 2b0262fb1b..daf32920f0 100755 --- a/test/functional/feature_on_chain_government.py +++ b/test/functional/feature_on_chain_government.py @@ -25,6 +25,7 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-subsidytest=1'], ] + @DefiTestFramework.rollback def run_test(self): # Get MN addresses diff --git a/test/functional/feature_on_chain_government_fee_distribution.py b/test/functional/feature_on_chain_government_fee_distribution.py index f18759fabc..f4a1a71577 100755 --- a/test/functional/feature_on_chain_government_fee_distribution.py +++ b/test/functional/feature_on_chain_government_fee_distribution.py @@ -140,6 +140,7 @@ def setup(self): self.sync_blocks() + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_on_chain_government_govvar_update.py b/test/functional/feature_on_chain_government_govvar_update.py index e4c3ac9803..bb1bd24f16 100755 --- a/test/functional/feature_on_chain_government_govvar_update.py +++ b/test/functional/feature_on_chain_government_govvar_update.py @@ -571,6 +571,7 @@ def setup(self): self.sync_blocks(timeout=120) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_on_chain_government_voting_period_alignment.py b/test/functional/feature_on_chain_government_voting_period_alignment.py index 1cba5342bc..1536653104 100755 --- a/test/functional/feature_on_chain_government_voting_period_alignment.py +++ b/test/functional/feature_on_chain_government_voting_period_alignment.py @@ -23,6 +23,7 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-subsidytest=1'], ] + @DefiTestFramework.rollback def run_test(self): # Get MN addresses diff --git a/test/functional/feature_oracles.py b/test/functional/feature_oracles.py index 175f8b5a75..66b6193ae9 100755 --- a/test/functional/feature_oracles.py +++ b/test/functional/feature_oracles.py @@ -97,6 +97,7 @@ def synchronize(self, node: int): self.nodes[node].generate(1) self.sync_blocks([self.nodes[0], self.nodes[1], self.nodes[2]]) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(200) self.sync_blocks() diff --git a/test/functional/feature_poolpair.py b/test/functional/feature_poolpair.py index fe494e3d25..2e990ff75b 100755 --- a/test/functional/feature_poolpair.py +++ b/test/functional/feature_poolpair.py @@ -28,6 +28,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_poolpair_liquidity.py b/test/functional/feature_poolpair_liquidity.py index d7a13a1534..9848cd8cb6 100755 --- a/test/functional/feature_poolpair_liquidity.py +++ b/test/functional/feature_poolpair_liquidity.py @@ -34,6 +34,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_poolswap.py b/test/functional/feature_poolswap.py index 19ef7080da..0dbde44bab 100755 --- a/test/functional/feature_poolswap.py +++ b/test/functional/feature_poolswap.py @@ -569,6 +569,7 @@ def revert_to_initial_state(self): assert_equal(len(self.nodes[2].listpoolpairs()), 0) + @DefiTestFramework.rollback def run_test(self): self.setup() self.test_swap_with_no_liquidity() diff --git a/test/functional/feature_poolswap_composite.py b/test/functional/feature_poolswap_composite.py index b1fe7a1437..f4bcb9fcfd 100755 --- a/test/functional/feature_poolswap_composite.py +++ b/test/functional/feature_poolswap_composite.py @@ -24,6 +24,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=106', '-bayfrontgardensheight=107', '-dakotaheight=108', '-eunosheight=109', '-fortcanningheight=110', '-grandcentralheight=170', '-fortcanninghillheight=200'], ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=106', '-bayfrontgardensheight=107', '-dakotaheight=108', '-eunosheight=109', '-fortcanningheight=110', '-grandcentralheight=170', '-fortcanninghillheight=200']] + @DefiTestFramework.rollback def run_test(self): # Create tokens diff --git a/test/functional/feature_poolswap_mainnet.py b/test/functional/feature_poolswap_mainnet.py index 53da32f440..dedb6a01c5 100755 --- a/test/functional/feature_poolswap_mainnet.py +++ b/test/functional/feature_poolswap_mainnet.py @@ -333,6 +333,7 @@ def test_swap_full_amount_of_one_side_of_pool(self): assert_equal(poolpair_info_GS['1']['reserveA'], Decimal('9950000.00000203')) assert_equal(poolpair_info_GS['1']['reserveB'], Decimal('251256.28140704')) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_poolswap_mechanism.py b/test/functional/feature_poolswap_mechanism.py index b0df3c1166..ba99c0c532 100755 --- a/test/functional/feature_poolswap_mechanism.py +++ b/test/functional/feature_poolswap_mechanism.py @@ -233,6 +233,7 @@ def poolswap(self, nodes): reserveB = self.nodes[0].getpoolpair(pool, True)[idPool]['reserveB'] assert_equal(str(reserveB), format(newReserveB, '.8f')) + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_prevent_bad_tx_propagation.py b/test/functional/feature_prevent_bad_tx_propagation.py index 23c7d89c96..14e1b5fd97 100755 --- a/test/functional/feature_prevent_bad_tx_propagation.py +++ b/test/functional/feature_prevent_bad_tx_propagation.py @@ -15,6 +15,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50']] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index 6a96c3bec3..c3f95fe8c6 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -146,6 +146,7 @@ def node_test(self, node, proxies, auth, test_onion=True): return rv + @DefiTestFramework.rollback def run_test(self): # basic -proxy self.node_test(self.nodes[0], [self.serv1, self.serv1, self.serv1, self.serv1], False) diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index de972d1387..ed6a73f8ba 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -346,6 +346,7 @@ def wallet_test(self): self.start_node(5, extra_args=["-prune=550"]) self.log.info("Success") + @DefiTestFramework.rollback def run_test(self): self.log.info("Warning! This test requires 4GB of disk space") diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py index a773801646..557866344d 100755 --- a/test/functional/feature_rbf.py +++ b/test/functional/feature_rbf.py @@ -79,6 +79,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Leave IBD self.nodes[0].generate(1) diff --git a/test/functional/feature_reindex.py b/test/functional/feature_reindex.py index 303418f018..c806aac48f 100755 --- a/test/functional/feature_reindex.py +++ b/test/functional/feature_reindex.py @@ -27,6 +27,7 @@ def reindex(self, justchainstate=False): wait_until(lambda: self.nodes[0].getblockcount() == blockcount) self.log.info("Success") + @DefiTestFramework.rollback def run_test(self): self.reindex(False) self.reindex(True) diff --git a/test/functional/feature_reject_customtxs.py b/test/functional/feature_reject_customtxs.py index e11272d74c..c8a5ca9d80 100755 --- a/test/functional/feature_reject_customtxs.py +++ b/test/functional/feature_reject_customtxs.py @@ -16,6 +16,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-fortcanningheight=120']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_restore_utxo.py b/test/functional/feature_restore_utxo.py index a5f862ca2e..bc7c89ed87 100755 --- a/test/functional/feature_restore_utxo.py +++ b/test/functional/feature_restore_utxo.py @@ -16,6 +16,7 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1'], ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/feature_rpcstats.py b/test/functional/feature_rpcstats.py index 5a7acb6efa..79989d3253 100755 --- a/test/functional/feature_rpcstats.py +++ b/test/functional/feature_rpcstats.py @@ -22,6 +22,7 @@ def set_test_params(self): ['-acindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-rpcstats=0'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py index ecefa10335..97ce3b4e69 100755 --- a/test/functional/feature_segwit.py +++ b/test/functional/feature_segwit.py @@ -95,6 +95,7 @@ def skip_mine(self, node, txid, sign, redeem_script=""): def fail_accept(self, node, error_msg, txid, sign, redeem_script=""): assert_raises_rpc_error(-26, error_msg, send_to_witness, use_p2wsh=1, node=node, utxo=getutxo(txid), pubkey=self.pubkey[0], encode_p2sh=False, amount=Decimal("49.998"), sign=sign, insert_redeem_script=redeem_script) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(161) # block 161 diff --git a/test/functional/feature_sendtokenstoaddress.py b/test/functional/feature_sendtokenstoaddress.py index c4e0b773a8..0191f85b8d 100755 --- a/test/functional/feature_sendtokenstoaddress.py +++ b/test/functional/feature_sendtokenstoaddress.py @@ -24,6 +24,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'], ] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_sendutxosfrom.py b/test/functional/feature_sendutxosfrom.py index ee581eef28..703cd79096 100755 --- a/test/functional/feature_sendutxosfrom.py +++ b/test/functional/feature_sendutxosfrom.py @@ -17,6 +17,7 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-txindex=1'], ['-txnotokens=0', '-amkheight=1', '-txindex=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(110) self.sync_blocks() diff --git a/test/functional/feature_setgov.py b/test/functional/feature_setgov.py index 5d7b435c60..920c94c6d0 100755 --- a/test/functional/feature_setgov.py +++ b/test/functional/feature_setgov.py @@ -24,6 +24,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningcrunchheight=1200', '-fortcanningspringheight=1250', '-grandcentralheight=1300', '-subsidytest=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningcrunchheight=1200', '-fortcanningspringheight=1250', '-grandcentralheight=1300', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.setup_tokens() diff --git a/test/functional/feature_shutdown.py b/test/functional/feature_shutdown.py index 64473befaf..fd071184a1 100755 --- a/test/functional/feature_shutdown.py +++ b/test/functional/feature_shutdown.py @@ -18,6 +18,7 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): node = get_rpc_proxy(self.nodes[0].url, 1, timeout=600, coveragedir=self.nodes[0].coverage_dir) # Force connection establishment by executing a dummy command. diff --git a/test/functional/feature_skip_collateral_factor_check.py b/test/functional/feature_skip_collateral_factor_check.py index 1c58501a66..12aa1ce08b 100755 --- a/test/functional/feature_skip_collateral_factor_check.py +++ b/test/functional/feature_skip_collateral_factor_check.py @@ -15,6 +15,7 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanningroadheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=200', '-regtest-skip-loan-collateral-validation', '-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): # Generate chain self.nodes[0].generate(120) diff --git a/test/functional/feature_smart_contracts.py b/test/functional/feature_smart_contracts.py index edeb1cc4d2..47f04076a7 100755 --- a/test/functional/feature_smart_contracts.py +++ b/test/functional/feature_smart_contracts.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1010', '-subsidytest=1', '-txindex=1', '-jellyfish_regtest=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1000) diff --git a/test/functional/feature_split_migrate_lock.py b/test/functional/feature_split_migrate_lock.py index cde045cf8d..9ae3df4b1a 100755 --- a/test/functional/feature_split_migrate_lock.py +++ b/test/functional/feature_split_migrate_lock.py @@ -29,6 +29,7 @@ def set_test_params(self): '-grandcentralheight=200', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.setup_test_tokens() self.test_unlock_migration() diff --git a/test/functional/feature_stored_interest.py b/test/functional/feature_stored_interest.py index 20bea881df..15bc662404 100755 --- a/test/functional/feature_stored_interest.py +++ b/test/functional/feature_stored_interest.py @@ -18,6 +18,7 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-jellyfish_regtest=1', '-negativeinterest=1']] + @DefiTestFramework.rollback def run_test(self): # Create tokens for tests self.setup_test_tokens() diff --git a/test/functional/feature_testpoolswap.py b/test/functional/feature_testpoolswap.py index be076f8bca..f8319c6a61 100755 --- a/test/functional/feature_testpoolswap.py +++ b/test/functional/feature_testpoolswap.py @@ -262,6 +262,7 @@ def test_testpoolswap_with_multi_pool_fee(self, swap_fn, tokenFrom, path): self.nodes[0].generate(1) self.assert_testpoolswap_amount(swap_fn, tokenFrom, path) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_token_fork.py b/test/functional/feature_token_fork.py index 171f857835..ed1439d8d0 100755 --- a/test/functional/feature_token_fork.py +++ b/test/functional/feature_token_fork.py @@ -19,6 +19,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=120']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_token_lock.py b/test/functional/feature_token_lock.py index 169809fab5..cb4539040a 100755 --- a/test/functional/feature_token_lock.py +++ b/test/functional/feature_token_lock.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=200', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_token_merge.py b/test/functional/feature_token_merge.py index 75ca0d4da8..e172e6fea5 100755 --- a/test/functional/feature_token_merge.py +++ b/test/functional/feature_token_merge.py @@ -431,6 +431,7 @@ def check_amounts_on_merge(self, poolId, tokenId, revert=False): self.rollback_to(revertHeight) return new_token_id + @DefiTestFramework.rollback def run_test(self): self.setup() self.check_attributes_on_merge(self.idT1, revert=True) diff --git a/test/functional/feature_token_merge_usd_value.py b/test/functional/feature_token_merge_usd_value.py index ab36e12b81..db695917af 100755 --- a/test/functional/feature_token_merge_usd_value.py +++ b/test/functional/feature_token_merge_usd_value.py @@ -314,6 +314,7 @@ def test_values_after_token_unlock(self): assert_greater_than_or_equal(vault["informativeRatio"], 0) assert_greater_than_or_equal(vault["collateralRatio"], 0) + @DefiTestFramework.rollback def run_test(self): self.setup() self.compare_usd_account_value_on_merge(revert=True) diff --git a/test/functional/feature_token_split.py b/test/functional/feature_token_split.py index 0e12c64deb..b0ece4a9db 100755 --- a/test/functional/feature_token_split.py +++ b/test/functional/feature_token_split.py @@ -23,6 +23,7 @@ def set_test_params(self): self.extra_args = [ ['-vaultindex=1', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', f'-fortcanningcrunchheight={self.fort_canning_crunch}', '-subsidytest=1']] + @DefiTestFramework.rollback def run_test(self): self.setup_test_tokens() self.setup_test_pools() diff --git a/test/functional/feature_token_split_mechanism.py b/test/functional/feature_token_split_mechanism.py index fc15f2c259..9738b0bdc3 100755 --- a/test/functional/feature_token_split_mechanism.py +++ b/test/functional/feature_token_split_mechanism.py @@ -439,6 +439,7 @@ def check_amounts_on_split(self, poolId, tokenId, revert=False): self.rollback_to(revertHeight) return new_token_id + @DefiTestFramework.rollback def run_test(self): self.setup() initialStateBlock = self.nodes[0].getblockcount() diff --git a/test/functional/feature_token_split_usd_value.py b/test/functional/feature_token_split_usd_value.py index fcc6fcb5cb..3099f60a31 100755 --- a/test/functional/feature_token_split_usd_value.py +++ b/test/functional/feature_token_split_usd_value.py @@ -324,6 +324,7 @@ def test_values_after_token_unlock(self): assert_greater_than_or_equal(vault["informativeRatio"], 0) assert_greater_than_or_equal(vault["collateralRatio"], 0) + @DefiTestFramework.rollback def run_test(self): self.setup() assert_equal(1,1) # Make linter happy for now diff --git a/test/functional/feature_tokens_basic.py b/test/functional/feature_tokens_basic.py index db2640971a..2898d99070 100755 --- a/test/functional/feature_tokens_basic.py +++ b/test/functional/feature_tokens_basic.py @@ -25,6 +25,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_dat.py b/test/functional/feature_tokens_dat.py index d3cda0c573..e44e65df15 100755 --- a/test/functional/feature_tokens_dat.py +++ b/test/functional/feature_tokens_dat.py @@ -28,6 +28,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_minting.py b/test/functional/feature_tokens_minting.py index 1f819b968a..e32f5cd390 100755 --- a/test/functional/feature_tokens_minting.py +++ b/test/functional/feature_tokens_minting.py @@ -19,6 +19,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_multisig.py b/test/functional/feature_tokens_multisig.py index a26d305260..ba7ebcf833 100755 --- a/test/functional/feature_tokens_multisig.py +++ b/test/functional/feature_tokens_multisig.py @@ -15,6 +15,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_uacomment.py b/test/functional/feature_uacomment.py index 9452110c5e..2bdc0e35e5 100755 --- a/test/functional/feature_uacomment.py +++ b/test/functional/feature_uacomment.py @@ -16,6 +16,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): self.log.info("test multiple -uacomment") test_uacomment = self.nodes[0].getnetworkinfo()["subversion"][-12:-1] diff --git a/test/functional/feature_update_mn.py b/test/functional/feature_update_mn.py index 0c70fa6358..da4eff9ea5 100755 --- a/test/functional/feature_update_mn.py +++ b/test/functional/feature_update_mn.py @@ -23,6 +23,7 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140', '-fortcanningheight=145'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140', '-fortcanningheight=145']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) self.nodes[0].generate(100) diff --git a/test/functional/feature_vault_pct_check_factor.py b/test/functional/feature_vault_pct_check_factor.py index 895b8e349d..5b76e46530 100755 --- a/test/functional/feature_vault_pct_check_factor.py +++ b/test/functional/feature_vault_pct_check_factor.py @@ -236,6 +236,7 @@ def post_FCE_DFI_minimum_check_takeloan(self): self.rollback_to(block_height) self.rollback_checks([vault_id]) + @DefiTestFramework.rollback def run_test(self): self.setup() self.post_FCE_DFI_minimum_check_takeloan() diff --git a/test/functional/feature_versionbits_warning.py b/test/functional/feature_versionbits_warning.py index 93579e9add..719d7ac4f9 100755 --- a/test/functional/feature_versionbits_warning.py +++ b/test/functional/feature_versionbits_warning.py @@ -60,6 +60,7 @@ def versionbits_in_alert_file(self): alert_text = open(self.alert_filename, 'r', encoding='utf8').read() return VB_PATTERN.search(alert_text) is not None + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.add_p2p_connection(P2PInterface()) diff --git a/test/functional/interface_defi_cli.py b/test/functional/interface_defi_cli.py index 2dc69c26ea..5f9064ce40 100755 --- a/test/functional/interface_defi_cli.py +++ b/test/functional/interface_defi_cli.py @@ -12,6 +12,7 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/interface_http.py b/test/functional/interface_http.py index 00b667fbd0..d08f78c42c 100755 --- a/test/functional/interface_http.py +++ b/test/functional/interface_http.py @@ -17,6 +17,7 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() + @DefiTestFramework.rollback def run_test(self): ################################################# diff --git a/test/functional/interface_http_cors.py b/test/functional/interface_http_cors.py index 68f9fedd1d..959fb5d0d0 100755 --- a/test/functional/interface_http_cors.py +++ b/test/functional/interface_http_cors.py @@ -16,6 +16,7 @@ def set_test_params(self): self.cors_origin = "http://localhost:8000" self.extra_args = [["-rpcallowcors=" + self.cors_origin]] + @DefiTestFramework.rollback def run_test(self): url = urllib.parse.urlparse(self.nodes[0].url) diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index ae9ff1df98..d7cc9e967d 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -74,6 +74,7 @@ def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, body= elif ret_type == RetType.JSON: return json.loads(resp.read().decode('utf-8'), parse_float=Decimal) + @DefiTestFramework.rollback def run_test(self): self.url = urllib.parse.urlparse(self.nodes[0].url) self.log.info("Mine blocks and send Defi to node 1") diff --git a/test/functional/interface_rpc.py b/test/functional/interface_rpc.py index e24593a2cb..e95889f2cd 100755 --- a/test/functional/interface_rpc.py +++ b/test/functional/interface_rpc.py @@ -66,6 +66,7 @@ def test_http_status_codes(self): expect_http_status(404, -32601, self.nodes[0].invalidmethod) expect_http_status(500, -8, self.nodes[0].getblockhash, 42) + @DefiTestFramework.rollback def run_test(self): self.test_getrpcinfo() self.test_batch_request() diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py index 280a3c0c12..299b4a1e75 100755 --- a/test/functional/interface_zmq.py +++ b/test/functional/interface_zmq.py @@ -42,6 +42,7 @@ def skip_test_if_missing_module(self): self.skip_if_no_py3_zmq() self.skip_if_no_defid_zmq() + @DefiTestFramework.rollback def run_test(self): import zmq self.ctx = zmq.Context() diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 9b5426cdc3..7ea4e5448c 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -48,6 +48,7 @@ def check_mempool_result(self, result_expected, *args, **kwargs): assert_equal(result_expected, result_test) assert_equal(self.nodes[0].getmempoolinfo()['size'], self.mempool_size) # Must not change mempool state + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py index 1fd90168ab..b096ee681c 100755 --- a/test/functional/mempool_limit.py +++ b/test/functional/mempool_limit.py @@ -22,6 +22,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): txouts = gen_return_txouts() relayfee = self.nodes[0].getnetworkinfo()['relayfee'] diff --git a/test/functional/mempool_package_onemore.py b/test/functional/mempool_package_onemore.py index 52e170084b..47ab5fa36a 100755 --- a/test/functional/mempool_package_onemore.py +++ b/test/functional/mempool_package_onemore.py @@ -40,6 +40,7 @@ def chain_transaction(self, node, parent_txids, vouts, value, fee, num_outputs): assert len(fulltx['vout']) == num_outputs # make sure we didn't generate a change output return (txid, send_value) + @DefiTestFramework.rollback def run_test(self): # Mine some blocks and have them mature. self.nodes[0].generate(101) diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py index 3b3ae92efd..cb5e25d691 100755 --- a/test/functional/mempool_packages.py +++ b/test/functional/mempool_packages.py @@ -40,6 +40,7 @@ def chain_transaction(self, node, parent_txid, vout, value, fee, num_outputs): assert len(fulltx['vout']) == num_outputs # make sure we didn't generate a change output return (txid, send_value) + @DefiTestFramework.rollback def run_test(self): # Mine some blocks and have them mature. self.nodes[0].generate(101) diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py index 347dffe96b..754dd7f8de 100755 --- a/test/functional/mempool_persist.py +++ b/test/functional/mempool_persist.py @@ -50,6 +50,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): chain_height = self.nodes[0].getblockcount() assert_equal(chain_height, 200) diff --git a/test/functional/mempool_reorg.py b/test/functional/mempool_reorg.py index aaebfad21c..dc91e89689 100755 --- a/test/functional/mempool_reorg.py +++ b/test/functional/mempool_reorg.py @@ -22,6 +22,7 @@ def skip_test_if_missing_module(self): alert_filename = None # Set by setup_network + @DefiTestFramework.rollback def run_test(self): # Start with a 200 block chain assert_equal(self.nodes[0].getblockcount(), 200) diff --git a/test/functional/mempool_resurrect.py b/test/functional/mempool_resurrect.py index afd2deea2f..5f9cf23bd0 100755 --- a/test/functional/mempool_resurrect.py +++ b/test/functional/mempool_resurrect.py @@ -16,6 +16,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node0_address = self.nodes[0].getnewaddress() # Spend block 1/2/3's coinbase transactions diff --git a/test/functional/mempool_spend_coinbase.py b/test/functional/mempool_spend_coinbase.py index 9095fee160..a194253d85 100755 --- a/test/functional/mempool_spend_coinbase.py +++ b/test/functional/mempool_spend_coinbase.py @@ -24,6 +24,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): chain_height = self.nodes[0].getblockcount() assert_equal(chain_height, 200) diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index b9013e32a0..378ea2dd79 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -58,6 +58,7 @@ def mine_chain(self): self.restart_node(0) connect_nodes_bi(self.nodes, 0, 1) + @DefiTestFramework.rollback def run_test(self): self.mine_chain() node = self.nodes[0] diff --git a/test/functional/mining_getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py index 4893667022..ff69c6a97e 100755 --- a/test/functional/mining_getblocktemplate_longpoll.py +++ b/test/functional/mining_getblocktemplate_longpoll.py @@ -31,6 +31,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info("Warning: this test will take about 70 seconds in the best case. Be patient.") self.nodes[0].generate(10) diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py index ac780175ed..fc522089c9 100755 --- a/test/functional/mining_prioritisetransaction.py +++ b/test/functional/mining_prioritisetransaction.py @@ -22,6 +22,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Test `prioritisetransaction` required parameters assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction) diff --git a/test/functional/p2p_blocksonly.py b/test/functional/p2p_blocksonly.py index aea70f185a..fe46c9bd78 100755 --- a/test/functional/p2p_blocksonly.py +++ b/test/functional/p2p_blocksonly.py @@ -16,6 +16,7 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [["-blocksonly"]] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py index 88f1c5842b..896a2c1f0a 100755 --- a/test/functional/p2p_compactblocks.py +++ b/test/functional/p2p_compactblocks.py @@ -794,6 +794,7 @@ def announce_cmpct_block(node, peer): stalling_peer.send_and_ping(msg) assert_equal(int(node.getbestblockhash(), 16), block.sha256) + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections self.segwit_node = self.nodes[0].add_p2p_connection(TestP2PConn(cmpct_version=2)) diff --git a/test/functional/p2p_disconnect_ban.py b/test/functional/p2p_disconnect_ban.py index 62772d2c13..5a894a7dd0 100755 --- a/test/functional/p2p_disconnect_ban.py +++ b/test/functional/p2p_disconnect_ban.py @@ -18,6 +18,7 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [['-dummypos=1'], ['-dummypos=1']] + @DefiTestFramework.rollback def run_test(self): self.log.info("Test setban and listbanned RPCs") diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py index 7e785f51d2..d119bf773b 100755 --- a/test/functional/p2p_feefilter.py +++ b/test/functional/p2p_feefilter.py @@ -45,6 +45,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node1 = self.nodes[1] node0 = self.nodes[0] diff --git a/test/functional/p2p_fingerprint.py b/test/functional/p2p_fingerprint.py index bd8d781749..8aa71385ab 100755 --- a/test/functional/p2p_fingerprint.py +++ b/test/functional/p2p_fingerprint.py @@ -73,6 +73,7 @@ def last_header_equals(self, expected_hash, node): # by the node while recent stale blocks and old active chain blocks are. # This does not currently test that stale blocks timestamped within the # last month but that have over a month's worth of work are also withheld. + @DefiTestFramework.rollback def run_test(self): node0 = self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py index 9f9982210e..f97357bb02 100755 --- a/test/functional/p2p_invalid_block.py +++ b/test/functional/p2p_invalid_block.py @@ -24,6 +24,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [["-whitelist=127.0.0.1", "-dummypos=1"]] + @DefiTestFramework.rollback def run_test(self): # Add p2p connection to node0 node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/p2p_invalid_locator.py b/test/functional/p2p_invalid_locator.py index f164402c47..efd6c661ac 100755 --- a/test/functional/p2p_invalid_locator.py +++ b/test/functional/p2p_invalid_locator.py @@ -16,6 +16,7 @@ def set_test_params(self): self.setup_clean_chain = False self.extra_args = [["-dummypos=1"]] + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node node.generate(1) # Get node out of IBD diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 24fd93c3c4..3e0f4b2293 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -32,6 +32,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): """ . Test msg header diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py index b82ed9fb3a..d461059c9c 100755 --- a/test/functional/p2p_invalid_tx.py +++ b/test/functional/p2p_invalid_tx.py @@ -46,6 +46,7 @@ def reconnect_p2p(self, **kwargs): self.nodes[0].disconnect_p2ps() self.bootstrap_p2p(**kwargs) + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index 602c0cffd1..c8d3816c5e 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -94,6 +94,7 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [['-banscore=' + str(banscore)]] + @DefiTestFramework.rollback def run_test(self): no_version_bannode = self.nodes[0].add_p2p_connection(CNodeNoVersionBan(), send_version=False, wait_for_verack=False) no_version_idlenode = self.nodes[0].add_p2p_connection(CNodeNoVersionIdle(), send_version=False, wait_for_verack=False) diff --git a/test/functional/p2p_leak_tx.py b/test/functional/p2p_leak_tx.py index 221569e5f9..e46c6db8fc 100755 --- a/test/functional/p2p_leak_tx.py +++ b/test/functional/p2p_leak_tx.py @@ -24,6 +24,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): gen_node = self.nodes[0] # The block and tx generating node gen_node.generate(1) diff --git a/test/functional/p2p_mempool.py b/test/functional/p2p_mempool.py index 2b80f979a6..158d330bfe 100755 --- a/test/functional/p2p_mempool.py +++ b/test/functional/p2p_mempool.py @@ -19,6 +19,7 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [["-peerbloomfilters=0"]] + @DefiTestFramework.rollback def run_test(self): # Add a p2p connection self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_node_network_limited.py b/test/functional/p2p_node_network_limited.py index fe9bb99b7e..c6df07234d 100755 --- a/test/functional/p2p_node_network_limited.py +++ b/test/functional/p2p_node_network_limited.py @@ -55,6 +55,7 @@ def setup_network(self): self.start_nodes() self.import_deterministic_coinbase_privkeys() + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0].add_p2p_connection(P2PIgnoreInv()) diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py index e540e05e14..018b6fcddb 100755 --- a/test/functional/p2p_permissions.py +++ b/test/functional/p2p_permissions.py @@ -21,6 +21,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[],[]] + @DefiTestFramework.rollback def run_test(self): self.checkpermission( # default permissions (no specific permissions) diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index b424ad96cd..ba7900098c 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -219,6 +219,7 @@ def update_witness_block_with_transactions(self, block, tx_list, nonce=0): add_witness_commitment(block, nonce) block.solve() + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # self.test_node sets NODE_WITNESS|NODE_NETWORK diff --git a/test/functional/p2p_segwit2.py b/test/functional/p2p_segwit2.py index 9c3d1430f3..2e5d7155e0 100755 --- a/test/functional/p2p_segwit2.py +++ b/test/functional/p2p_segwit2.py @@ -183,6 +183,7 @@ def update_witness_block_with_transactions(self, block, tx_list, nonce=0): add_witness_commitment(block, nonce) block.solve() + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # self.test_node sets NODE_WITNESS|NODE_NETWORK diff --git a/test/functional/p2p_sendheaders.py b/test/functional/p2p_sendheaders.py index fedb5b1b7b..22e06b6103 100755 --- a/test/functional/p2p_sendheaders.py +++ b/test/functional/p2p_sendheaders.py @@ -253,6 +253,7 @@ def mine_reorg(self, length): self.sync_blocks(self.nodes, wait=0.1) return [int(x, 16) for x in all_hashes] + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections inv_node = self.nodes[0].add_p2p_connection(BaseNode()) diff --git a/test/functional/p2p_timeouts.py b/test/functional/p2p_timeouts.py index e5636791f2..4367b5822b 100755 --- a/test/functional/p2p_timeouts.py +++ b/test/functional/p2p_timeouts.py @@ -39,6 +39,7 @@ def set_test_params(self): # set timeout to receive version/verack to 3 seconds self.extra_args = [["-peertimeout=3"]] + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections no_verack_node = self.nodes[0].add_p2p_connection(TestP2PConn()) diff --git a/test/functional/p2p_tx_download.py b/test/functional/p2p_tx_download.py index 00dfa50b3f..1f9879f92f 100755 --- a/test/functional/p2p_tx_download.py +++ b/test/functional/p2p_tx_download.py @@ -157,6 +157,7 @@ def test_in_flight_max(self): wait_until(lambda: p.tx_getdata_count == MAX_GETDATA_IN_FLIGHT + 2) self.nodes[0].setmocktime(0) + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections self.peers = [] diff --git a/test/functional/p2p_unrequested_blocks.py b/test/functional/p2p_unrequested_blocks.py index 551da113e8..430ed40860 100755 --- a/test/functional/p2p_unrequested_blocks.py +++ b/test/functional/p2p_unrequested_blocks.py @@ -78,6 +78,7 @@ def setup_network(self): # with nMinimumChainWork. self.setup_nodes() + @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # test_node connects to node0 (not whitelisted) diff --git a/test/functional/rpc_bind.py b/test/functional/rpc_bind.py index 4710329057..acd0f3f59e 100755 --- a/test/functional/rpc_bind.py +++ b/test/functional/rpc_bind.py @@ -59,6 +59,7 @@ def run_allowip_test(self, allow_ips, rpchost, rpcport): node.getnetworkinfo() self.stop_nodes() + @DefiTestFramework.rollback def run_test(self): # due to OS-specific network stats queries, this test works only on Linux if sum([self.options.run_ipv4, self.options.run_ipv6, self.options.run_nonloopback]) > 1: diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 688b71cc04..874faaab98 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -50,6 +50,7 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): self.mine_chain() self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py index 60c8fa1736..98f30eb942 100755 --- a/test/functional/rpc_createmultisig.py +++ b/test/functional/rpc_createmultisig.py @@ -30,6 +30,7 @@ def get_keys(self): self.priv = [node1.dumpprivkey(a) for a in add] self.final = node2.getnewaddress() + @DefiTestFramework.rollback def run_test(self): node0, node1, node2 = self.nodes diff --git a/test/functional/rpc_decodescript.py b/test/functional/rpc_decodescript.py index 2742bd08e6..3e5630cb56 100755 --- a/test/functional/rpc_decodescript.py +++ b/test/functional/rpc_decodescript.py @@ -225,6 +225,7 @@ def decoderawtransaction_asm_sighashtype(self): rpc_result = self.nodes[0].decoderawtransaction(txSave.serialize().hex()) assert_equal('OP_RETURN 3011020701010101010101020601010101010101', rpc_result['vin'][0]['scriptSig']['asm']) + @DefiTestFramework.rollback def run_test(self): self.decodescript_script_sig() self.decodescript_script_pub_key() diff --git a/test/functional/rpc_deprecated.py b/test/functional/rpc_deprecated.py index 511c60e0ac..de068f3cb7 100755 --- a/test/functional/rpc_deprecated.py +++ b/test/functional/rpc_deprecated.py @@ -12,6 +12,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[], []] + @DefiTestFramework.rollback def run_test(self): # This test should be used to verify correct behaviour of deprecated # RPC methods with and without the -deprecatedrpc flags. For example: diff --git a/test/functional/rpc_deriveaddresses.py b/test/functional/rpc_deriveaddresses.py index 7d95be653e..0f64bb2582 100755 --- a/test/functional/rpc_deriveaddresses.py +++ b/test/functional/rpc_deriveaddresses.py @@ -12,6 +12,7 @@ def set_test_params(self): self.num_nodes = 1 self.supports_cli = 1 + @DefiTestFramework.rollback def run_test(self): assert_raises_rpc_error(-5, "Missing checksum", self.nodes[0].deriveaddresses, "a") diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 507afe72a1..68b886954f 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -40,6 +40,7 @@ def setup_network(self): connect_nodes_bi(self.nodes, 0, 2) connect_nodes_bi(self.nodes, 0, 3) + @DefiTestFramework.rollback def run_test(self): self.min_relay_tx_fee = self.nodes[0].getnetworkinfo()['relayfee'] # This test is not meant to test fee estimation and we'd like diff --git a/test/functional/rpc_getaccounthistory.py b/test/functional/rpc_getaccounthistory.py index 06c8eadb6d..b3718dc9f4 100755 --- a/test/functional/rpc_getaccounthistory.py +++ b/test/functional/rpc_getaccounthistory.py @@ -20,6 +20,7 @@ def set_test_params(self): ['-acindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) num_tokens = len(self.nodes[0].listtokens()) diff --git a/test/functional/rpc_getblockfilter.py b/test/functional/rpc_getblockfilter.py index 602bac995c..f474d705a9 100755 --- a/test/functional/rpc_getblockfilter.py +++ b/test/functional/rpc_getblockfilter.py @@ -18,6 +18,7 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-blockfilterindex"], []] + @DefiTestFramework.rollback def run_test(self): # Create two chains by disconnecting nodes 0 & 1, mining, then reconnecting disconnect_nodes(self.nodes[0], 1) diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py index 54496375b5..623119d194 100755 --- a/test/functional/rpc_getblockstats.py +++ b/test/functional/rpc_getblockstats.py @@ -86,6 +86,7 @@ def load_test_data(self, filename): self.nodes[0].submitblock(b) + @DefiTestFramework.rollback def run_test(self): test_data = os.path.join(TESTSDIR, self.options.test_data) if self.options.gen_test_data: diff --git a/test/functional/rpc_getchaintips.py b/test/functional/rpc_getchaintips.py index c4416210ea..ecddbb217e 100755 --- a/test/functional/rpc_getchaintips.py +++ b/test/functional/rpc_getchaintips.py @@ -17,6 +17,7 @@ class GetChainTipsTest (DefiTestFramework): def set_test_params(self): self.num_nodes = 4 + @DefiTestFramework.rollback def run_test(self): tips = self.nodes[0].getchaintips() assert_equal(len(tips), 1) diff --git a/test/functional/rpc_getcustomtx.py b/test/functional/rpc_getcustomtx.py index 36aa876db7..d379db965d 100755 --- a/test/functional/rpc_getcustomtx.py +++ b/test/functional/rpc_getcustomtx.py @@ -32,6 +32,7 @@ def check_result(self, result): assert_equal(result['blockhash'], blockhash) assert_equal(result['confirmations'], 1) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/rpc_getmininginfo.py b/test/functional/rpc_getmininginfo.py index 45ce1b5807..f0809fa6da 100755 --- a/test/functional/rpc_getmininginfo.py +++ b/test/functional/rpc_getmininginfo.py @@ -18,6 +18,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node0_keys = self.nodes[0].get_genesis_keys() node1_keys = self.nodes[1].get_genesis_keys() diff --git a/test/functional/rpc_getstoredinterest.py b/test/functional/rpc_getstoredinterest.py index 8a91fedc49..adf0002d16 100755 --- a/test/functional/rpc_getstoredinterest.py +++ b/test/functional/rpc_getstoredinterest.py @@ -1241,6 +1241,7 @@ def setup(self): self.nodes[0].generate(10) self.setup_height = self.nodes[0].getblockcount() + @DefiTestFramework.rollback def run_test(self): rollback = True diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py index d27d7c4b9b..f4af633790 100755 --- a/test/functional/rpc_help.py +++ b/test/functional/rpc_help.py @@ -14,6 +14,7 @@ class HelpRpcTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): self.test_categories() self.dump_help() diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py index 390e57fd76..e8781ab7bf 100755 --- a/test/functional/rpc_invalidateblock.py +++ b/test/functional/rpc_invalidateblock.py @@ -21,6 +21,7 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() + @DefiTestFramework.rollback def run_test(self): self.log.info("Make sure we repopulate setBlockIndexCandidates after InvalidateBlock:") self.log.info("Mine 4 blocks on Node 0") diff --git a/test/functional/rpc_listaccounthistory.py b/test/functional/rpc_listaccounthistory.py index 60af58c64a..7f598522a7 100755 --- a/test/functional/rpc_listaccounthistory.py +++ b/test/functional/rpc_listaccounthistory.py @@ -26,6 +26,7 @@ def set_test_params(self): '-grandcentralheight=51'], ] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) num_tokens = len(self.nodes[0].listtokens()) diff --git a/test/functional/rpc_listgovproposals.py b/test/functional/rpc_listgovproposals.py index 9c06118794..c546507d76 100755 --- a/test/functional/rpc_listgovproposals.py +++ b/test/functional/rpc_listgovproposals.py @@ -280,6 +280,7 @@ def create_10_proposals_and_aprove_half(self): prop_list = self.nodes[0].listgovproposals("all", "completed", 4) assert_equal(len(prop_list), 5) + @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/rpc_listvaulthistory.py b/test/functional/rpc_listvaulthistory.py index 930695f5b9..947304e388 100755 --- a/test/functional/rpc_listvaulthistory.py +++ b/test/functional/rpc_listvaulthistory.py @@ -17,6 +17,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=100', '-eunosheight=100', '-eunospayaheight=100', '-fortcanningheight=100', '-vaultindex=1']] + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py index d769117335..aacfebb26c 100755 --- a/test/functional/rpc_misc.py +++ b/test/functional/rpc_misc.py @@ -20,6 +20,7 @@ class RpcMiscTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/rpc_mn_basic.py b/test/functional/rpc_mn_basic.py index 6a13598e1f..d0d2eeb0e3 100755 --- a/test/functional/rpc_mn_basic.py +++ b/test/functional/rpc_mn_basic.py @@ -25,6 +25,7 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140'], ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140']] + @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) self.nodes[0].generate(100) diff --git a/test/functional/rpc_named_arguments.py b/test/functional/rpc_named_arguments.py index 55b268636a..77cf9b5fe2 100755 --- a/test/functional/rpc_named_arguments.py +++ b/test/functional/rpc_named_arguments.py @@ -14,6 +14,7 @@ class NamedArgumentTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] h = node.help(command='getblockchaininfo') diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 741ba80244..772ee7e77f 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -28,6 +28,7 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-minrelaytxfee=0.00001000"],["-minrelaytxfee=0.00000500"]] + @DefiTestFramework.rollback def run_test(self): self._test_connection_count() self._test_getnettotals() diff --git a/test/functional/rpc_preciousblock.py b/test/functional/rpc_preciousblock.py index 7f03f5ef49..b148825c74 100755 --- a/test/functional/rpc_preciousblock.py +++ b/test/functional/rpc_preciousblock.py @@ -40,6 +40,7 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() + @DefiTestFramework.rollback def run_test(self): self.log.info("Ensure submitblock can in principle reorg to a competing chain") # gen_address = lambda i: self.nodes[i].get_genesis_keys().address # A non-wallet address to mine to diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index d1771d9c4a..6092ffd0e8 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -75,6 +75,7 @@ def test_utxo_conversion(self): connect_nodes_bi(self.nodes, 0, 1) connect_nodes_bi(self.nodes, 0, 2) + @DefiTestFramework.rollback def run_test(self): # Create and fund a raw tx for sending 10 BTC psbtx1 = self.nodes[0].walletcreatefundedpsbt([], {self.nodes[2].getnewaddress():10})['psbt'] diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index e09326e6dd..3551a9ca7c 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -51,6 +51,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info('prepare some coins for multiple *rawtransaction commands') self.nodes[2].generate(1) diff --git a/test/functional/rpc_scantxoutset.py b/test/functional/rpc_scantxoutset.py index 380bce615d..3a861295a1 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -21,6 +21,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(110) diff --git a/test/functional/rpc_setban.py b/test/functional/rpc_setban.py index 99c28d5569..bcc2b0c681 100755 --- a/test/functional/rpc_setban.py +++ b/test/functional/rpc_setban.py @@ -16,6 +16,7 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[],[]] + @DefiTestFramework.rollback def run_test(self): # Node 0 connects to Node 1, check that the noban permission is not granted connect_nodes(self.nodes[0], 1) diff --git a/test/functional/rpc_signmessage.py b/test/functional/rpc_signmessage.py index cec64269f8..0a4879fda2 100755 --- a/test/functional/rpc_signmessage.py +++ b/test/functional/rpc_signmessage.py @@ -16,6 +16,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): message = 'This is just a test message' diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py index ae551491c9..33ca04f57d 100755 --- a/test/functional/rpc_signrawtransaction.py +++ b/test/functional/rpc_signrawtransaction.py @@ -168,6 +168,7 @@ def witness_script_test(self): assert 'complete' in spending_tx_signed assert_equal(spending_tx_signed['complete'], True) + @DefiTestFramework.rollback def run_test(self): self.successful_signing_test() self.script_verification_error_test() diff --git a/test/functional/rpc_txoutproof.py b/test/functional/rpc_txoutproof.py index 6a97399113..f0c5c9a998 100755 --- a/test/functional/rpc_txoutproof.py +++ b/test/functional/rpc_txoutproof.py @@ -18,6 +18,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(105) diff --git a/test/functional/rpc_updatemasternode.py b/test/functional/rpc_updatemasternode.py index abfe0338d8..56a389f450 100755 --- a/test/functional/rpc_updatemasternode.py +++ b/test/functional/rpc_updatemasternode.py @@ -110,6 +110,7 @@ def transfer_owner(self, mn_id): assert_equal(result['collateralTx'], mn_transfer_tx) assert_equal(result['ownerAuthAddress'], new_owner) + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(105) self.sync_blocks() diff --git a/test/functional/rpc_uptime.py b/test/functional/rpc_uptime.py index 63a36b071f..40fa791879 100755 --- a/test/functional/rpc_uptime.py +++ b/test/functional/rpc_uptime.py @@ -17,6 +17,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True + @DefiTestFramework.rollback def run_test(self): self._test_uptime() diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py index 2ee872dca4..2e81a3971e 100755 --- a/test/functional/rpc_users.py +++ b/test/functional/rpc_users.py @@ -83,6 +83,7 @@ def test_auth(self, node, user, password): self.log.info('Wrong...') assert_equal(401, call_with_auth(node, user+'wrong', password+'wrong').status) + @DefiTestFramework.rollback def run_test(self): ################################################## diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index 40135caffc..f196a04e09 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -195,6 +195,7 @@ def test_getwalletinfo_on_different_wallet(self): assert_equal(shasum_after, shasum_before) self.log.debug('Wallet file shasum unchanged\n') + @DefiTestFramework.rollback def run_test(self): self.wallet_path = os.path.join(self.nodes[0].datadir, 'regtest', 'wallets', 'wallet.dat') self.test_invalid_tool_commands_and_args() diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py index ed2232f4c7..95baf97b23 100755 --- a/test/functional/wallet_abandonconflict.py +++ b/test/functional/wallet_abandonconflict.py @@ -29,6 +29,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[1].generate(100) self.sync_blocks() diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py index d1c6dc5b44..5b8f4ac863 100755 --- a/test/functional/wallet_address_types.py +++ b/test/functional/wallet_address_types.py @@ -218,6 +218,7 @@ def test_change_output_type(self, node_sender, destinations, expected_type): self.log.debug("Check if change address " + change_addresses[0] + " is " + expected_type) self.test_address(node_sender, change_addresses[0], multisig=False, typ=expected_type) + @DefiTestFramework.rollback def run_test(self): # Mine 101 blocks on node5 to bring nodes out of IBD and make sure that # no coinbases are maturing for the nodes-under-test during the test diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index 5961e2b558..8d30d94d43 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -78,6 +78,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): '''Set up initial chain and run tests defined below''' diff --git a/test/functional/wallet_backup.py b/test/functional/wallet_backup.py index fe1671f8ae..d6b3a775f8 100755 --- a/test/functional/wallet_backup.py +++ b/test/functional/wallet_backup.py @@ -108,6 +108,7 @@ def erase_three(self): os.remove(os.path.join(self.nodes[1].datadir, 'regtest', 'wallets', 'wallet.dat')) os.remove(os.path.join(self.nodes[2].datadir, 'regtest', 'wallets', 'wallet.dat')) + @DefiTestFramework.rollback def run_test(self): self.log.info("Generating initial blockchain") self.nodes[0].generate(1) diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py index c1f3fb826b..3aa8d9cffc 100755 --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -58,6 +58,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].importaddress(ADDRESS_WATCHONLY) # Check that nodes don't own any UTXOs diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 27d6dc9763..7d378cdcc0 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -46,6 +46,7 @@ def check_fee_amount(self, curr_balance, balance_with_fee, fee_per_byte, tx_size def get_vsize(self, txn): return self.nodes[0].decoderawtransaction(txn)['vsize'] + @DefiTestFramework.rollback def run_test(self): # Check that there's no UTXO on none of the nodes assert_equal(len(self.nodes[0].listunspent()), 0) diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py index 532c2e25d7..7b93e69d98 100755 --- a/test/functional/wallet_bumpfee.py +++ b/test/functional/wallet_bumpfee.py @@ -44,6 +44,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Encrypt wallet for test_locked_wallet_fails test self.nodes[1].encryptwallet(WALLET_PASSPHRASE) diff --git a/test/functional/wallet_bumpfee_totalfee_deprecation.py b/test/functional/wallet_bumpfee_totalfee_deprecation.py index 350dbe94d2..f8daefe484 100755 --- a/test/functional/wallet_bumpfee_totalfee_deprecation.py +++ b/test/functional/wallet_bumpfee_totalfee_deprecation.py @@ -20,6 +20,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): peer_node, rbf_node = self.nodes peer_node.generate(110) diff --git a/test/functional/wallet_coinbase_category.py b/test/functional/wallet_coinbase_category.py index 590086a03a..e128437a12 100755 --- a/test/functional/wallet_coinbase_category.py +++ b/test/functional/wallet_coinbase_category.py @@ -30,6 +30,7 @@ def assert_category(self, category, address, txid, skip): {"address": address}, {"category": category}) + @DefiTestFramework.rollback def run_test(self): # Generate one block to an address address = self.nodes[0].getnewaddress() diff --git a/test/functional/wallet_create_tx.py b/test/functional/wallet_create_tx.py index fdb2141873..c8b4c8cbbf 100755 --- a/test/functional/wallet_create_tx.py +++ b/test/functional/wallet_create_tx.py @@ -21,6 +21,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info('Create some old blocks') self.nodes[0].setmocktime(TIME_GENESIS_BLOCK+1) diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py index 5890679fe2..beb374fbb0 100755 --- a/test/functional/wallet_createwallet.py +++ b/test/functional/wallet_createwallet.py @@ -20,6 +20,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(1) # Leave IBD for sethdseed diff --git a/test/functional/wallet_dump.py b/test/functional/wallet_dump.py index b9ac67d787..1f00553486 100755 --- a/test/functional/wallet_dump.py +++ b/test/functional/wallet_dump.py @@ -98,6 +98,7 @@ def setup_network(self): self.add_nodes(self.num_nodes, extra_args=self.extra_args) self.start_nodes() + @DefiTestFramework.rollback def run_test(self): wallet_unenc_dump = os.path.join(self.nodes[0].datadir, "wallet.unencrypted.dump") wallet_enc_dump = os.path.join(self.nodes[0].datadir, "wallet.encrypted.dump") diff --git a/test/functional/wallet_encryption.py b/test/functional/wallet_encryption.py index 1622310f64..aa63bc9788 100755 --- a/test/functional/wallet_encryption.py +++ b/test/functional/wallet_encryption.py @@ -22,6 +22,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): passphrase = "WalletPassphrase" passphrase2 = "SecondWalletPassphrase" diff --git a/test/functional/wallet_fallbackfee.py b/test/functional/wallet_fallbackfee.py index af14c57873..28e29050f7 100755 --- a/test/functional/wallet_fallbackfee.py +++ b/test/functional/wallet_fallbackfee.py @@ -14,6 +14,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py index acd12b2098..0ba0da8825 100755 --- a/test/functional/wallet_groups.py +++ b/test/functional/wallet_groups.py @@ -26,6 +26,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Mine some coins self.nodes[0].generate(110) diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py index 3dd7b37245..10e622a742 100755 --- a/test/functional/wallet_hd.py +++ b/test/functional/wallet_hd.py @@ -24,6 +24,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Make sure we use hd, keep masterkeyid masterkeyid = self.nodes[1].getwalletinfo()['hdseedid'] diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py index 03ba7e5dbf..47b9965240 100755 --- a/test/functional/wallet_import_rescan.py +++ b/test/functional/wallet_import_rescan.py @@ -168,6 +168,7 @@ def setup_network(self): for i in range(1, self.num_nodes): connect_nodes(self.nodes[i], 0) + @DefiTestFramework.rollback def run_test(self): # Create one transaction on node 0 with a unique amount for # each possible type of wallet import RPC. diff --git a/test/functional/wallet_import_with_label.py b/test/functional/wallet_import_with_label.py index d53128e7a6..90149059b9 100755 --- a/test/functional/wallet_import_with_label.py +++ b/test/functional/wallet_import_with_label.py @@ -22,6 +22,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 8554b40b8c..86fa05a3b2 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -58,6 +58,7 @@ def test_importmulti(self, req, success, error_code=None, error_message=None, wa assert_equal(result[0]['error']['code'], error_code) assert_equal(result[0]['error']['message'], error_message) + @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(1) diff --git a/test/functional/wallet_importprunedfunds.py b/test/functional/wallet_importprunedfunds.py index 04fa36e029..46ad27e1e3 100755 --- a/test/functional/wallet_importprunedfunds.py +++ b/test/functional/wallet_importprunedfunds.py @@ -19,6 +19,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(101) diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index fbf149ac4c..e50c573524 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -16,6 +16,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): nodes = self.nodes addr_before_encrypting = nodes[0].getnewaddress() diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py index b23bfcf4f5..5aff77936f 100755 --- a/test/functional/wallet_keypool_topup.py +++ b/test/functional/wallet_keypool_topup.py @@ -29,6 +29,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): wallet_path = os.path.join(self.nodes[1].datadir, "regtest", "wallets", "wallet.dat") wallet_backup_path = os.path.join(self.nodes[1].datadir, "wallet.bak") diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py index bf19f9cbea..b809aec44a 100755 --- a/test/functional/wallet_labels.py +++ b/test/functional/wallet_labels.py @@ -22,6 +22,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Check that there's no UTXO on the node node = self.nodes[0] diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py index 80c75df014..315dc2bd07 100755 --- a/test/functional/wallet_listreceivedby.py +++ b/test/functional/wallet_listreceivedby.py @@ -20,6 +20,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): # Generate block to get out of IBD self.nodes[0].generate(1) diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py index 27adeaf695..c0db40abb4 100755 --- a/test/functional/wallet_listsinceblock.py +++ b/test/functional/wallet_listsinceblock.py @@ -15,6 +15,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[2].generate(101) self.sync_blocks() diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py index fc64df21da..77a3621921 100755 --- a/test/functional/wallet_listtransactions.py +++ b/test/functional/wallet_listtransactions.py @@ -27,6 +27,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1) # Get out of IBD self.sync_blocks() diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py index 4e27b956ff..5eabafd5b5 100755 --- a/test/functional/wallet_multiwallet.py +++ b/test/functional/wallet_multiwallet.py @@ -27,6 +27,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py index 52c559242f..f511b29d47 100755 --- a/test/functional/wallet_resendwallettransactions.py +++ b/test/functional/wallet_resendwallettransactions.py @@ -31,6 +31,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # alias diff --git a/test/functional/wallet_txn_clone.py b/test/functional/wallet_txn_clone.py index b5f94e2941..58d953a669 100755 --- a/test/functional/wallet_txn_clone.py +++ b/test/functional/wallet_txn_clone.py @@ -32,6 +32,7 @@ def setup_network(self): disconnect_nodes(self.nodes[1], 2) disconnect_nodes(self.nodes[2], 1) + @DefiTestFramework.rollback def run_test(self): if self.options.segwit: output_type = "p2sh-segwit" diff --git a/test/functional/wallet_txn_doublespend.py b/test/functional/wallet_txn_doublespend.py index 8426fdb45d..ba2f6d4ff6 100755 --- a/test/functional/wallet_txn_doublespend.py +++ b/test/functional/wallet_txn_doublespend.py @@ -30,6 +30,7 @@ def setup_network(self): disconnect_nodes(self.nodes[1], 2) disconnect_nodes(self.nodes[2], 1) + @DefiTestFramework.rollback def run_test(self): # All nodes should start with 1,250 BTC: starting_balance = 1250 diff --git a/test/functional/wallet_watchonly.py b/test/functional/wallet_watchonly.py index edff751a46..4370916839 100755 --- a/test/functional/wallet_watchonly.py +++ b/test/functional/wallet_watchonly.py @@ -21,6 +21,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/wallet_zapwallettxes.py b/test/functional/wallet_zapwallettxes.py index 6de50dc4da..0a5168c433 100755 --- a/test/functional/wallet_zapwallettxes.py +++ b/test/functional/wallet_zapwallettxes.py @@ -30,6 +30,7 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(1) From 7479f0c5a58e32fc9698933f9f7ae5f912312026 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 27 Jan 2023 19:04:03 +0100 Subject: [PATCH 03/14] Fixes index error accessing self.nodes list --- .../test_framework/test_framework.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 37d886eae2..6c3a2c42cd 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -105,14 +105,18 @@ def __init__(self): @classmethod def rollback(cls, func): def wrapper(self, *args, **kwargs): - init_height = self.nodes[0].getblockcount() - init_data = self._get_chain_data() + init_height = None + init_data = None + if len(self.nodes != 0): + init_height = self.nodes[0].getblockcount() + init_data = self._get_chain_data() result = func(self, *args, **kwargs) - self.rollback_to(init_height) - final_data = self._get_chain_data() - final_height = self.nodes[0].getblockcount() - assert(init_data == final_data) - assert(init_height == final_height) + if len(self.nodes != 0): + self.rollback_to(init_height) + final_data = self._get_chain_data() + final_height = self.nodes[0].getblockcount() + assert(init_data == final_data) + assert(init_height == final_height) return result return wrapper From 6989ea91149494dfed7054f5b27119839f120ac4 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 27 Jan 2023 21:42:02 +0100 Subject: [PATCH 04/14] Fix typo. --- test/functional/test_framework/test_framework.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 6c3a2c42cd..b330a1cb3b 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -107,11 +107,11 @@ def rollback(cls, func): def wrapper(self, *args, **kwargs): init_height = None init_data = None - if len(self.nodes != 0): + if len(self.nodes) != 0: init_height = self.nodes[0].getblockcount() init_data = self._get_chain_data() result = func(self, *args, **kwargs) - if len(self.nodes != 0): + if len(self.nodes) != 0: self.rollback_to(init_height) final_data = self._get_chain_data() final_height = self.nodes[0].getblockcount() From 11a06af98d378ba925b953abf7991b23c606303c Mon Sep 17 00:00:00 2001 From: dcorral Date: Tue, 31 Jan 2023 10:40:30 +0100 Subject: [PATCH 05/14] Revert "Sets decorator in main tests." This reverts commit ba8b4b6153d75949bc64e6217c15f446762d114a. --- test/functional/create_cache.py | 1 - test/functional/example_block_hash.py | 1 - test/functional/example_test.py | 1 - test/functional/feature_abortnode.py | 1 - test/functional/feature_account_mining.py | 1 - test/functional/feature_accounts_n_utxos.py | 1 - test/functional/feature_accounts_validation.py | 1 - test/functional/feature_anchor_rewards.py | 1 - test/functional/feature_anchorauths_pruning.py | 1 - test/functional/feature_any_accounts_to_accounts.py | 1 - test/functional/feature_assumevalid.py | 1 - test/functional/feature_asymmetric_fee.py | 1 - test/functional/feature_auth_return_change.py | 1 - test/functional/feature_autoauth.py | 1 - test/functional/feature_bip68_sequence.py | 1 - test/functional/feature_bitcoin_htlc.py | 1 - test/functional/feature_bitcoin_wallet.py | 1 - test/functional/feature_block.py | 1 - test/functional/feature_block_reward.py | 1 - test/functional/feature_blocksdir.py | 1 - test/functional/feature_burn_address.py | 1 - test/functional/feature_checkpoint.py | 1 - test/functional/feature_cltv.py | 1 - test/functional/feature_commission_fix.py | 1 - test/functional/feature_community_development_funds.py | 1 - test/functional/feature_communitybalance_reorg.py | 1 - test/functional/feature_config_args.py | 1 - test/functional/feature_consortium.py | 1 - test/functional/feature_csv_activation.py | 1 - test/functional/feature_custom_poolreward.py | 1 - test/functional/feature_dbcrash.py | 1 - test/functional/feature_dersig.py | 1 - test/functional/feature_dfip8_communitybalances.py | 1 - test/functional/feature_dip1.py | 1 - test/functional/feature_dusd_loans.py | 1 - test/functional/feature_eunos_balances.py | 1 - test/functional/feature_fee_estimation.py | 1 - test/functional/feature_filelock.py | 1 - test/functional/feature_foundation_migration.py | 1 - test/functional/feature_futures.py | 1 - test/functional/feature_help.py | 1 - test/functional/feature_higher_collateral_factor.py | 1 - test/functional/feature_icx_orderbook.py | 1 - test/functional/feature_icx_orderbook_errors.py | 1 - test/functional/feature_includeconf.py | 1 - test/functional/feature_initdist.py | 1 - test/functional/feature_jellyfish_initial_funds.py | 1 - test/functional/feature_listaccounthistory_multiaccountquery.py | 1 - test/functional/feature_listaccounts_pagination.py | 1 - test/functional/feature_loan.py | 1 - test/functional/feature_loan_auctions.py | 1 - test/functional/feature_loan_basics.py | 1 - test/functional/feature_loan_deposittovault.py | 1 - test/functional/feature_loan_dusd_as_collateral.py | 1 - test/functional/feature_loan_estimatecollateral.py | 1 - test/functional/feature_loan_estimateloan.py | 1 - test/functional/feature_loan_get_interest.py | 1 - test/functional/feature_loan_interest.py | 1 - test/functional/feature_loan_listauctions.py | 1 - test/functional/feature_loan_low_interest.py | 1 - test/functional/feature_loan_payback_dfi.py | 1 - test/functional/feature_loan_payback_dfi_v2.py | 1 - test/functional/feature_loan_payback_with_collateral.py | 1 - test/functional/feature_loan_priceupdate.py | 1 - test/functional/feature_loan_scheme.py | 1 - test/functional/feature_loan_setcollateraltoken.py | 1 - test/functional/feature_loan_setloantoken.py | 1 - test/functional/feature_loan_vault.py | 1 - test/functional/feature_loan_vaultstate.py | 1 - test/functional/feature_lock_unspends.py | 1 - test/functional/feature_logging.py | 1 - test/functional/feature_longterm_lockin.py | 1 - test/functional/feature_masternode_operator.py | 1 - test/functional/feature_maxuploadtarget.py | 1 - test/functional/feature_median_time.py | 1 - test/functional/feature_mempool_dakota.py | 1 - test/functional/feature_migrate_v1_in_futures.py | 1 - test/functional/feature_minchainwork.py | 1 - test/functional/feature_mine_cached.py | 1 - test/functional/feature_negative_interest.py | 1 - test/functional/feature_negative_loan_interest.py | 1 - test/functional/feature_notifications.py | 1 - test/functional/feature_nulldummy.py | 1 - test/functional/feature_on_chain_government.py | 1 - test/functional/feature_on_chain_government_fee_distribution.py | 1 - test/functional/feature_on_chain_government_govvar_update.py | 1 - .../feature_on_chain_government_voting_period_alignment.py | 1 - test/functional/feature_oracles.py | 1 - test/functional/feature_poolpair.py | 1 - test/functional/feature_poolpair_liquidity.py | 1 - test/functional/feature_poolswap.py | 1 - test/functional/feature_poolswap_composite.py | 1 - test/functional/feature_poolswap_mainnet.py | 1 - test/functional/feature_poolswap_mechanism.py | 1 - test/functional/feature_prevent_bad_tx_propagation.py | 1 - test/functional/feature_proxy.py | 1 - test/functional/feature_pruning.py | 1 - test/functional/feature_rbf.py | 1 - test/functional/feature_reindex.py | 1 - test/functional/feature_reject_customtxs.py | 1 - test/functional/feature_restore_utxo.py | 1 - test/functional/feature_rpcstats.py | 1 - test/functional/feature_segwit.py | 1 - test/functional/feature_sendtokenstoaddress.py | 1 - test/functional/feature_sendutxosfrom.py | 1 - test/functional/feature_setgov.py | 1 - test/functional/feature_shutdown.py | 1 - test/functional/feature_skip_collateral_factor_check.py | 1 - test/functional/feature_smart_contracts.py | 1 - test/functional/feature_split_migrate_lock.py | 1 - test/functional/feature_stored_interest.py | 1 - test/functional/feature_testpoolswap.py | 1 - test/functional/feature_token_fork.py | 1 - test/functional/feature_token_lock.py | 1 - test/functional/feature_token_merge.py | 1 - test/functional/feature_token_merge_usd_value.py | 1 - test/functional/feature_token_split.py | 1 - test/functional/feature_token_split_mechanism.py | 1 - test/functional/feature_token_split_usd_value.py | 1 - test/functional/feature_tokens_basic.py | 1 - test/functional/feature_tokens_dat.py | 1 - test/functional/feature_tokens_minting.py | 1 - test/functional/feature_tokens_multisig.py | 1 - test/functional/feature_uacomment.py | 1 - test/functional/feature_update_mn.py | 1 - test/functional/feature_vault_pct_check_factor.py | 1 - test/functional/feature_versionbits_warning.py | 1 - test/functional/interface_defi_cli.py | 1 - test/functional/interface_http.py | 1 - test/functional/interface_http_cors.py | 1 - test/functional/interface_rest.py | 1 - test/functional/interface_rpc.py | 1 - test/functional/interface_zmq.py | 1 - test/functional/mempool_accept.py | 1 - test/functional/mempool_limit.py | 1 - test/functional/mempool_package_onemore.py | 1 - test/functional/mempool_packages.py | 1 - test/functional/mempool_persist.py | 1 - test/functional/mempool_reorg.py | 1 - test/functional/mempool_resurrect.py | 1 - test/functional/mempool_spend_coinbase.py | 1 - test/functional/mining_basic.py | 1 - test/functional/mining_getblocktemplate_longpoll.py | 1 - test/functional/mining_prioritisetransaction.py | 1 - test/functional/p2p_blocksonly.py | 1 - test/functional/p2p_compactblocks.py | 1 - test/functional/p2p_disconnect_ban.py | 1 - test/functional/p2p_feefilter.py | 1 - test/functional/p2p_fingerprint.py | 1 - test/functional/p2p_invalid_block.py | 1 - test/functional/p2p_invalid_locator.py | 1 - test/functional/p2p_invalid_messages.py | 1 - test/functional/p2p_invalid_tx.py | 1 - test/functional/p2p_leak.py | 1 - test/functional/p2p_leak_tx.py | 1 - test/functional/p2p_mempool.py | 1 - test/functional/p2p_node_network_limited.py | 1 - test/functional/p2p_permissions.py | 1 - test/functional/p2p_segwit.py | 1 - test/functional/p2p_segwit2.py | 1 - test/functional/p2p_sendheaders.py | 1 - test/functional/p2p_timeouts.py | 1 - test/functional/p2p_tx_download.py | 1 - test/functional/p2p_unrequested_blocks.py | 1 - test/functional/rpc_bind.py | 1 - test/functional/rpc_blockchain.py | 1 - test/functional/rpc_createmultisig.py | 1 - test/functional/rpc_decodescript.py | 1 - test/functional/rpc_deprecated.py | 1 - test/functional/rpc_deriveaddresses.py | 1 - test/functional/rpc_fundrawtransaction.py | 1 - test/functional/rpc_getaccounthistory.py | 1 - test/functional/rpc_getblockfilter.py | 1 - test/functional/rpc_getblockstats.py | 1 - test/functional/rpc_getchaintips.py | 1 - test/functional/rpc_getcustomtx.py | 1 - test/functional/rpc_getmininginfo.py | 1 - test/functional/rpc_getstoredinterest.py | 1 - test/functional/rpc_help.py | 1 - test/functional/rpc_invalidateblock.py | 1 - test/functional/rpc_listaccounthistory.py | 1 - test/functional/rpc_listgovproposals.py | 1 - test/functional/rpc_listvaulthistory.py | 1 - test/functional/rpc_misc.py | 1 - test/functional/rpc_mn_basic.py | 1 - test/functional/rpc_named_arguments.py | 1 - test/functional/rpc_net.py | 1 - test/functional/rpc_preciousblock.py | 1 - test/functional/rpc_psbt.py | 1 - test/functional/rpc_rawtransaction.py | 1 - test/functional/rpc_scantxoutset.py | 1 - test/functional/rpc_setban.py | 1 - test/functional/rpc_signmessage.py | 1 - test/functional/rpc_signrawtransaction.py | 1 - test/functional/rpc_txoutproof.py | 1 - test/functional/rpc_updatemasternode.py | 1 - test/functional/rpc_uptime.py | 1 - test/functional/rpc_users.py | 1 - test/functional/tool_wallet.py | 1 - test/functional/wallet_abandonconflict.py | 1 - test/functional/wallet_address_types.py | 1 - test/functional/wallet_avoidreuse.py | 1 - test/functional/wallet_backup.py | 1 - test/functional/wallet_balance.py | 1 - test/functional/wallet_basic.py | 1 - test/functional/wallet_bumpfee.py | 1 - test/functional/wallet_bumpfee_totalfee_deprecation.py | 1 - test/functional/wallet_coinbase_category.py | 1 - test/functional/wallet_create_tx.py | 1 - test/functional/wallet_createwallet.py | 1 - test/functional/wallet_dump.py | 1 - test/functional/wallet_encryption.py | 1 - test/functional/wallet_fallbackfee.py | 1 - test/functional/wallet_groups.py | 1 - test/functional/wallet_hd.py | 1 - test/functional/wallet_import_rescan.py | 1 - test/functional/wallet_import_with_label.py | 1 - test/functional/wallet_importmulti.py | 1 - test/functional/wallet_importprunedfunds.py | 1 - test/functional/wallet_keypool.py | 1 - test/functional/wallet_keypool_topup.py | 1 - test/functional/wallet_labels.py | 1 - test/functional/wallet_listreceivedby.py | 1 - test/functional/wallet_listsinceblock.py | 1 - test/functional/wallet_listtransactions.py | 1 - test/functional/wallet_multiwallet.py | 1 - test/functional/wallet_resendwallettransactions.py | 1 - test/functional/wallet_txn_clone.py | 1 - test/functional/wallet_txn_doublespend.py | 1 - test/functional/wallet_watchonly.py | 1 - test/functional/wallet_zapwallettxes.py | 1 - 231 files changed, 231 deletions(-) diff --git a/test/functional/create_cache.py b/test/functional/create_cache.py index 958edd7fdc..2ca5e85572 100755 --- a/test/functional/create_cache.py +++ b/test/functional/create_cache.py @@ -21,7 +21,6 @@ def set_test_params(self): def setup_network(self): pass - @DefiTestFramework.rollback def run_test(self): pass diff --git a/test/functional/example_block_hash.py b/test/functional/example_block_hash.py index a205a79e14..7cde114995 100755 --- a/test/functional/example_block_hash.py +++ b/test/functional/example_block_hash.py @@ -14,7 +14,6 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 92eaaa0ad8..7df9ece02d 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -133,7 +133,6 @@ def custom_method(self): self.log.info("Running custom_method") - @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/feature_abortnode.py b/test/functional/feature_abortnode.py index 43a13ff21c..21eca724d9 100755 --- a/test/functional/feature_abortnode.py +++ b/test/functional/feature_abortnode.py @@ -24,7 +24,6 @@ def setup_network(self): self.setup_nodes() # We'll connect the nodes later - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(3) datadir = get_datadir_path(self.options.tmpdir, 0) diff --git a/test/functional/feature_account_mining.py b/test/functional/feature_account_mining.py index a5dbc2d0af..bee7633ff1 100755 --- a/test/functional/feature_account_mining.py +++ b/test/functional/feature_account_mining.py @@ -19,7 +19,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50']] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_accounts_n_utxos.py b/test/functional/feature_accounts_n_utxos.py index 6902d85e2d..2877d56938 100755 --- a/test/functional/feature_accounts_n_utxos.py +++ b/test/functional/feature_accounts_n_utxos.py @@ -23,7 +23,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_accounts_validation.py b/test/functional/feature_accounts_validation.py index 05baa8e936..c3cc12547c 100755 --- a/test/functional/feature_accounts_validation.py +++ b/test/functional/feature_accounts_validation.py @@ -17,7 +17,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_anchor_rewards.py b/test/functional/feature_anchor_rewards.py index d104367ec7..f4d39c5493 100755 --- a/test/functional/feature_anchor_rewards.py +++ b/test/functional/feature_anchor_rewards.py @@ -82,7 +82,6 @@ def authsquorum(self, height, node=None): return True return False - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) diff --git a/test/functional/feature_anchorauths_pruning.py b/test/functional/feature_anchorauths_pruning.py index d3737e6f0e..3c7e30036a 100755 --- a/test/functional/feature_anchorauths_pruning.py +++ b/test/functional/feature_anchorauths_pruning.py @@ -27,7 +27,6 @@ def genmocktime(self, time, intervals): self.nodes[0].set_mocktime(time + (i * 60 * 60)) self.nodes[0].generate(5) - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) diff --git a/test/functional/feature_any_accounts_to_accounts.py b/test/functional/feature_any_accounts_to_accounts.py index 70064f1372..2d2a15662b 100755 --- a/test/functional/feature_any_accounts_to_accounts.py +++ b/test/functional/feature_any_accounts_to_accounts.py @@ -31,7 +31,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'] ] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index 93c9217808..dbaae784a8 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -94,7 +94,6 @@ def assert_blockchain_height(self, node, height): elif current_height == height: break - @DefiTestFramework.rollback def run_test(self): p2p0 = self.nodes[0].add_p2p_connection(BaseNode()) diff --git a/test/functional/feature_asymmetric_fee.py b/test/functional/feature_asymmetric_fee.py index 1d53e26559..a36695fd5e 100755 --- a/test/functional/feature_asymmetric_fee.py +++ b/test/functional/feature_asymmetric_fee.py @@ -18,7 +18,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningspringheight=150', '-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): # Set up test tokens diff --git a/test/functional/feature_auth_return_change.py b/test/functional/feature_auth_return_change.py index 93346ccf4b..529a1c5e44 100755 --- a/test/functional/feature_auth_return_change.py +++ b/test/functional/feature_auth_return_change.py @@ -43,7 +43,6 @@ def check_auto_auth_txs(self, tx, owner, outputs = 2): assert_equal(len(final_rawtx['vout']), outputs) assert_equal(len(final_rawtx['vin']), 1) - @DefiTestFramework.rollback def run_test(self): coinbase = self.nodes[0].getnewaddress("", "legacy") self.nodes[0].generate(101, 1000000, coinbase) diff --git a/test/functional/feature_autoauth.py b/test/functional/feature_autoauth.py index 7913624e3e..3ae48c729d 100755 --- a/test/functional/feature_autoauth.py +++ b/test/functional/feature_autoauth.py @@ -26,7 +26,6 @@ def clear_auth_utxos(self): self.nodes[0].sendtoaddress(non_auth_address, balance - Decimal("0.1")) # 0.1 to cover fee self.nodes[0].generate(1, 1000000, non_auth_address) - @DefiTestFramework.rollback def run_test(self): n0 = self.nodes[0] diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py index 58b59300cf..0f969016cf 100755 --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -37,7 +37,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] diff --git a/test/functional/feature_bitcoin_htlc.py b/test/functional/feature_bitcoin_htlc.py index 1b78157cf6..85fd866582 100755 --- a/test/functional/feature_bitcoin_htlc.py +++ b/test/functional/feature_bitcoin_htlc.py @@ -20,7 +20,6 @@ def set_test_params(self): ] self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): # Set up wallet address = self.nodes[0].spv_getnewaddress() diff --git a/test/functional/feature_bitcoin_wallet.py b/test/functional/feature_bitcoin_wallet.py index a3af4f35a6..ee443b55b0 100755 --- a/test/functional/feature_bitcoin_wallet.py +++ b/test/functional/feature_bitcoin_wallet.py @@ -19,7 +19,6 @@ def set_test_params(self): ] self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): # Set up wallet self.nodes[0].spv_setlastheight(1) diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 56a1e386d3..7a421a4df0 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -84,7 +84,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-acceptnonstdtxn=1']] # This is a consensus block test, we don't care about tx policy - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/feature_block_reward.py b/test/functional/feature_block_reward.py index 4d125a14d3..8f0865061f 100755 --- a/test/functional/feature_block_reward.py +++ b/test/functional/feature_block_reward.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-eunosheight=100', '-eunosheight=100', '-fortcanningheight=110', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_blocksdir.py b/test/functional/feature_blocksdir.py index f07a521dac..00be05819a 100755 --- a/test/functional/feature_blocksdir.py +++ b/test/functional/feature_blocksdir.py @@ -16,7 +16,6 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): self.stop_node(0) assert os.path.isdir(os.path.join(self.nodes[0].datadir, self.chain, "blocks")) diff --git a/test/functional/feature_burn_address.py b/test/functional/feature_burn_address.py index 7e28bad8a2..3d68f1ebd3 100755 --- a/test/functional/feature_burn_address.py +++ b/test/functional/feature_burn_address.py @@ -18,7 +18,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=1', '-dakotaheight=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_checkpoint.py b/test/functional/feature_checkpoint.py index 84d3d65f26..b499d97e88 100755 --- a/test/functional/feature_checkpoint.py +++ b/test/functional/feature_checkpoint.py @@ -20,7 +20,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(100) self.sync_blocks() diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py index 3c42ce975e..35fe96bf10 100755 --- a/test/functional/feature_cltv.py +++ b/test/functional/feature_cltv.py @@ -68,7 +68,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/feature_commission_fix.py b/test/functional/feature_commission_fix.py index 05a47e27ce..1e5b64f448 100644 --- a/test/functional/feature_commission_fix.py +++ b/test/functional/feature_commission_fix.py @@ -19,7 +19,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1', f'-grandcentralheight={self.grand_central}', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): # Set up test tokens self.setup_test_tokens() diff --git a/test/functional/feature_community_development_funds.py b/test/functional/feature_community_development_funds.py index 112ac2ffb9..6e32a72780 100755 --- a/test/functional/feature_community_development_funds.py +++ b/test/functional/feature_community_development_funds.py @@ -23,7 +23,6 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=60', '-eunosheight=70', '-fortcanningheight=80', '-fortcanninghillheight=90', '-fortcanningroadheight=100', '-fortcanningcrunchheight=110', '-fortcanningspringheight=120', '-fortcanninggreatworldheight=130', '-grandcentralheight=201', '-subsidytest=1'], ] - @DefiTestFramework.rollback def run_test(self): node0 = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_communitybalance_reorg.py b/test/functional/feature_communitybalance_reorg.py index fc7c001a9a..b983376650 100755 --- a/test/functional/feature_communitybalance_reorg.py +++ b/test/functional/feature_communitybalance_reorg.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=0'], ['-txnotokens=0', '-amkheight=0']] - @DefiTestFramework.rollback def run_test(self): # Generate across nodes self.nodes[0].generate(10) diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py index 0b601cca34..a791db22ce 100755 --- a/test/functional/feature_config_args.py +++ b/test/functional/feature_config_args.py @@ -82,7 +82,6 @@ def test_log_buffer(self): self.start_node(0, extra_args=['-noconnect=0']) self.stop_node(0) - @DefiTestFramework.rollback def run_test(self): self.stop_node(0) diff --git a/test/functional/feature_consortium.py b/test/functional/feature_consortium.py index dd5db4c2ce..0aa3180897 100644 --- a/test/functional/feature_consortium.py +++ b/test/functional/feature_consortium.py @@ -20,7 +20,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): print("Generating initial chain...") diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py index 6f3766e275..4d0c11cd7d 100755 --- a/test/functional/feature_csv_activation.py +++ b/test/functional/feature_csv_activation.py @@ -168,7 +168,6 @@ def send_blocks(self, blocks, success=True): Call with success = False if the tip shouldn't advance to the most recent block.""" self.nodes[0].p2p.send_blocks_and_test(blocks, self.nodes[0], success=success) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PDataStore()) diff --git a/test/functional/feature_custom_poolreward.py b/test/functional/feature_custom_poolreward.py index b70077006f..5aa5fe696b 100755 --- a/test/functional/feature_custom_poolreward.py +++ b/test/functional/feature_custom_poolreward.py @@ -17,7 +17,6 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-clarkequayheight=50'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-clarkequayheight=50']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(102) self.sync_blocks() diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py index 9b184433f5..3a4051cb40 100755 --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -212,7 +212,6 @@ def generate_small_transactions(self, node, count, utxo_list): node.sendrawtransaction(tx_signed_hex) num_transactions += 1 - @DefiTestFramework.rollback def run_test(self): # Track test coverage statistics self.restart_counts = [0, 0, 0] # Track the restarts for nodes 0-2 diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py index acd1052bc5..4903bdcec2 100755 --- a/test/functional/feature_dersig.py +++ b/test/functional/feature_dersig.py @@ -51,7 +51,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/feature_dfip8_communitybalances.py b/test/functional/feature_dfip8_communitybalances.py index 5ffb60aba8..64532ebe6c 100755 --- a/test/functional/feature_dfip8_communitybalances.py +++ b/test/functional/feature_dfip8_communitybalances.py @@ -16,7 +16,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=1', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1) diff --git a/test/functional/feature_dip1.py b/test/functional/feature_dip1.py index c22b8ec0c0..df211c41a3 100755 --- a/test/functional/feature_dip1.py +++ b/test/functional/feature_dip1.py @@ -24,7 +24,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=2'], ['-txnotokens=0']] - @DefiTestFramework.rollback def run_test(self): assert_equal(self.nodes[0].getblockchaininfo()['softforks']['amk']['active'], False) diff --git a/test/functional/feature_dusd_loans.py b/test/functional/feature_dusd_loans.py index ee9635b938..65c47cfd0d 100755 --- a/test/functional/feature_dusd_loans.py +++ b/test/functional/feature_dusd_loans.py @@ -510,7 +510,6 @@ def post_FCE_DFI_minimum_check_takeloan(self): - @DefiTestFramework.rollback def run_test(self): # Initial set up self.setup() diff --git a/test/functional/feature_eunos_balances.py b/test/functional/feature_eunos_balances.py index 3d07dac142..6432550820 100755 --- a/test/functional/feature_eunos_balances.py +++ b/test/functional/feature_eunos_balances.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-eunosheight=200', '-dakotaheight=1']] - @DefiTestFramework.rollback def run_test(self): # Burn address diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py index bc62ba458b..820658db2e 100755 --- a/test/functional/feature_fee_estimation.py +++ b/test/functional/feature_fee_estimation.py @@ -181,7 +181,6 @@ def transact_and_mine(self, numblocks, mining_node): newmem.append(utx) self.memutxo = newmem - @DefiTestFramework.rollback def run_test(self): self.log.info("This test is time consuming, please be patient") self.log.info("Splitting inputs so we can generate tx's") diff --git a/test/functional/feature_filelock.py b/test/functional/feature_filelock.py index 0f9f6475a9..fdff409386 100755 --- a/test/functional/feature_filelock.py +++ b/test/functional/feature_filelock.py @@ -18,7 +18,6 @@ def setup_network(self): self.nodes[0].start([]) self.nodes[0].wait_for_rpc_connection() - @DefiTestFramework.rollback def run_test(self): datadir = os.path.join(self.nodes[0].datadir, 'regtest') self.log.info("Using datadir {}".format(datadir)) diff --git a/test/functional/feature_foundation_migration.py b/test/functional/feature_foundation_migration.py index 79267dd9bc..54fe845424 100755 --- a/test/functional/feature_foundation_migration.py +++ b/test/functional/feature_foundation_migration.py @@ -19,7 +19,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1', f'-grandcentralheight={self.grand_central}', '-subsidytest=1'] ] - @DefiTestFramework.rollback def run_test(self): # Define node 0 foundation address diff --git a/test/functional/feature_futures.py b/test/functional/feature_futures.py index 41bc7ee2c1..f9cb2805b4 100755 --- a/test/functional/feature_futures.py +++ b/test/functional/feature_futures.py @@ -20,7 +20,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=150', '-fortcanningroadheight=150', '-fortcanningspringheight=500', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_help.py b/test/functional/feature_help.py index a7bc090cbf..52f2ad4951 100755 --- a/test/functional/feature_help.py +++ b/test/functional/feature_help.py @@ -34,7 +34,6 @@ def get_node_output(self, *, ret_code_expected): return out, err - @DefiTestFramework.rollback def run_test(self): self.log.info("Start defi with -h for help text") self.nodes[0].start(extra_args=['-h']) diff --git a/test/functional/feature_higher_collateral_factor.py b/test/functional/feature_higher_collateral_factor.py index 9453f83b2b..8fa8b56582 100755 --- a/test/functional/feature_higher_collateral_factor.py +++ b/test/functional/feature_higher_collateral_factor.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanningroadheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=200', '-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): # Setup self.setup() diff --git a/test/functional/feature_icx_orderbook.py b/test/functional/feature_icx_orderbook.py index 8edefae42e..3998b51782 100755 --- a/test/functional/feature_icx_orderbook.py +++ b/test/functional/feature_icx_orderbook.py @@ -19,7 +19,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_icx_orderbook_errors.py b/test/functional/feature_icx_orderbook_errors.py index 5280992d9e..1a580a67ca 100755 --- a/test/functional/feature_icx_orderbook_errors.py +++ b/test/functional/feature_icx_orderbook_errors.py @@ -21,7 +21,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-eunospayaheight=50', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py index b435e50cfa..427141bbc4 100755 --- a/test/functional/feature_includeconf.py +++ b/test/functional/feature_includeconf.py @@ -35,7 +35,6 @@ def setup_chain(self): with open(os.path.join(self.options.tmpdir, "node0", "defi.conf"), "a", encoding='utf8') as f: f.write("uacomment=main\nincludeconf=relative.conf\n") - @DefiTestFramework.rollback def run_test(self): self.log.info("-includeconf works from config file. subversion should end with 'main; relative)/'") diff --git a/test/functional/feature_initdist.py b/test/functional/feature_initdist.py index cd576a0a4e..2a8593bf4e 100755 --- a/test/functional/feature_initdist.py +++ b/test/functional/feature_initdist.py @@ -31,7 +31,6 @@ def setup_network(self): connect_nodes_bi(self.nodes, i, i + 1) self.sync_blocks() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].importprivkey(privkey=self.nodes[0].PRIV_KEYS[5].ownerPrivKey, label='initdist') diff --git a/test/functional/feature_jellyfish_initial_funds.py b/test/functional/feature_jellyfish_initial_funds.py index 043467347d..5611a134a9 100755 --- a/test/functional/feature_jellyfish_initial_funds.py +++ b/test/functional/feature_jellyfish_initial_funds.py @@ -18,7 +18,6 @@ def set_test_params(self): # pass -jellyfish_regtest=1 option to enable regtest params required for jellyfish test containers self.extra_args = [['-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # generate one block diff --git a/test/functional/feature_listaccounthistory_multiaccountquery.py b/test/functional/feature_listaccounthistory_multiaccountquery.py index 826721768d..7feb67a39a 100644 --- a/test/functional/feature_listaccounthistory_multiaccountquery.py +++ b/test/functional/feature_listaccounthistory_multiaccountquery.py @@ -20,7 +20,6 @@ def set_test_params(self): '-grandcentralheight=51'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/feature_listaccounts_pagination.py b/test/functional/feature_listaccounts_pagination.py index 523b1a0246..dfdad8b4f2 100755 --- a/test/functional/feature_listaccounts_pagination.py +++ b/test/functional/feature_listaccounts_pagination.py @@ -16,7 +16,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ['-txnotokens=0', '-amkheight=50', '-eunosheight=101'], ] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_loan.py b/test/functional/feature_loan.py index 43f1d11824..aa689026c9 100755 --- a/test/functional/feature_loan.py +++ b/test/functional/feature_loan.py @@ -23,7 +23,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(300) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_auctions.py b/test/functional/feature_loan_auctions.py index 259207d47c..035dbf0c78 100755 --- a/test/functional/feature_loan_auctions.py +++ b/test/functional/feature_loan_auctions.py @@ -21,7 +21,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(500) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_basics.py b/test/functional/feature_loan_basics.py index 7361532c99..9f4e024acd 100755 --- a/test/functional/feature_loan_basics.py +++ b/test/functional/feature_loan_basics.py @@ -22,7 +22,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=220', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_deposittovault.py b/test/functional/feature_loan_deposittovault.py index 9b51682e6f..c2ba7f67a3 100755 --- a/test/functional/feature_loan_deposittovault.py +++ b/test/functional/feature_loan_deposittovault.py @@ -21,7 +21,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] - @DefiTestFramework.rollback def run_test(self): # Prepare tokens for deposittoloan assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_dusd_as_collateral.py b/test/functional/feature_loan_dusd_as_collateral.py index 6ba4c9d77b..e7acb6d100 100755 --- a/test/functional/feature_loan_dusd_as_collateral.py +++ b/test/functional/feature_loan_dusd_as_collateral.py @@ -19,7 +19,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=200', '-fortcanningroadheight=215', '-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(120) diff --git a/test/functional/feature_loan_estimatecollateral.py b/test/functional/feature_loan_estimatecollateral.py index e8bdd19dff..26bfb28c0a 100755 --- a/test/functional/feature_loan_estimatecollateral.py +++ b/test/functional/feature_loan_estimatecollateral.py @@ -19,7 +19,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_loan_estimateloan.py b/test/functional/feature_loan_estimateloan.py index 8ad6999317..fc3d092011 100755 --- a/test/functional/feature_loan_estimateloan.py +++ b/test/functional/feature_loan_estimateloan.py @@ -19,7 +19,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(125) diff --git a/test/functional/feature_loan_get_interest.py b/test/functional/feature_loan_get_interest.py index edba29ea3b..724baa3cf1 100755 --- a/test/functional/feature_loan_get_interest.py +++ b/test/functional/feature_loan_get_interest.py @@ -109,7 +109,6 @@ def setup(self): {self.account0: ["30@" + self.symbolDFI, "300@" + self.symboldUSD]}, self.account0) self.nodes[0].generate(1) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_interest.py b/test/functional/feature_loan_interest.py index aa581ddd86..b7cca760eb 100755 --- a/test/functional/feature_loan_interest.py +++ b/test/functional/feature_loan_interest.py @@ -22,7 +22,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanningmuseumheight=50', '-txindex=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanningmuseumheight=50', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_listauctions.py b/test/functional/feature_loan_listauctions.py index 5d443d8e6b..a34c7b918f 100755 --- a/test/functional/feature_loan_listauctions.py +++ b/test/functional/feature_loan_listauctions.py @@ -20,7 +20,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(400) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_low_interest.py b/test/functional/feature_loan_low_interest.py index 3473e9713b..cabcdcd8e3 100755 --- a/test/functional/feature_loan_low_interest.py +++ b/test/functional/feature_loan_low_interest.py @@ -407,7 +407,6 @@ def test_new_loan_with_interest_over_1satoshi_pre_post_fork(self, payback=True): - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_payback_dfi.py b/test/functional/feature_loan_payback_dfi.py index 7fc571b681..8695dc48cd 100755 --- a/test/functional/feature_loan_payback_dfi.py +++ b/test/functional/feature_loan_payback_dfi.py @@ -23,7 +23,6 @@ def set_test_params(self): '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningroadheight=196', '-fortcanningspringheight=200', '-debug=loan', '-txindex=1'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_loan_payback_dfi_v2.py b/test/functional/feature_loan_payback_dfi_v2.py index 9a85498b8d..50f443845d 100755 --- a/test/functional/feature_loan_payback_dfi_v2.py +++ b/test/functional/feature_loan_payback_dfi_v2.py @@ -830,7 +830,6 @@ def multipayback_DUSD_with_DFI_and_DUSD_Pre_FCR(self): assert_equal(Decimal(balanceDFIBefore) - Decimal(balanceDFIAfter), Decimal('10')) - @DefiTestFramework.rollback def run_test(self): self.setup(FCR=True) self.payback_DUSD_with_BTC() diff --git a/test/functional/feature_loan_payback_with_collateral.py b/test/functional/feature_loan_payback_with_collateral.py index 97c2713fe7..076cb5805f 100755 --- a/test/functional/feature_loan_payback_with_collateral.py +++ b/test/functional/feature_loan_payback_with_collateral.py @@ -555,7 +555,6 @@ def test_negative_interest_loans_greater_than_collaterals(self, payback_with_col self.rollback_to(height) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_loan_priceupdate.py b/test/functional/feature_loan_priceupdate.py index fc8302dbaf..1d2b3ed2b3 100755 --- a/test/functional/feature_loan_priceupdate.py +++ b/test/functional/feature_loan_priceupdate.py @@ -23,7 +23,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', f'-fortcanninghillheight={self.FCH}'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(300) self.nodes[0].createtoken({ diff --git a/test/functional/feature_loan_scheme.py b/test/functional/feature_loan_scheme.py index 8fae471903..eb7458367c 100755 --- a/test/functional/feature_loan_scheme.py +++ b/test/functional/feature_loan_scheme.py @@ -20,7 +20,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=110'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_loan_setcollateraltoken.py b/test/functional/feature_loan_setcollateraltoken.py index 5c1ad3e5ae..1a63402686 100755 --- a/test/functional/feature_loan_setcollateraltoken.py +++ b/test/functional/feature_loan_setcollateraltoken.py @@ -21,7 +21,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningcrunchheight=150', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_setloantoken.py b/test/functional/feature_loan_setloantoken.py index 746fb847a1..a13d455b0f 100755 --- a/test/functional/feature_loan_setloantoken.py +++ b/test/functional/feature_loan_setloantoken.py @@ -21,7 +21,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=50', '-fortcanningheight=50', '-fortcanninghillheight=50', '-fortcanningcrunchheight=110', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_loan_vault.py b/test/functional/feature_loan_vault.py index 3a7a24b35f..ab5fe3cb87 100755 --- a/test/functional/feature_loan_vault.py +++ b/test/functional/feature_loan_vault.py @@ -944,7 +944,6 @@ def loan_and_collateral_token_to_govvar(self): assert_equal(result[f'v0/token/{self.idAAPL}/loan_minting_enabled'], 'true') assert_equal(result[f'v0/token/{self.idAAPL}/loan_minting_interest'], '1') - @DefiTestFramework.rollback def run_test(self): self.setup() self.createvault_with_invalid_parameters() diff --git a/test/functional/feature_loan_vaultstate.py b/test/functional/feature_loan_vaultstate.py index a618e79ca9..ecb913d5e3 100755 --- a/test/functional/feature_loan_vaultstate.py +++ b/test/functional/feature_loan_vaultstate.py @@ -21,7 +21,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1'] ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(500) self.nodes[0].createtoken({ diff --git a/test/functional/feature_lock_unspends.py b/test/functional/feature_lock_unspends.py index 12cbc7d822..a45dfd4bf3 100755 --- a/test/functional/feature_lock_unspends.py +++ b/test/functional/feature_lock_unspends.py @@ -13,7 +13,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(105) account_address = self.nodes[0].getnewaddress("", "bech32") diff --git a/test/functional/feature_logging.py b/test/functional/feature_logging.py index eb9f9fb79a..467d04355c 100755 --- a/test/functional/feature_logging.py +++ b/test/functional/feature_logging.py @@ -18,7 +18,6 @@ def set_test_params(self): def relative_log_path(self, name): return os.path.join(self.nodes[0].datadir, "regtest", name) - @DefiTestFramework.rollback def run_test(self): # test default log file name default_log_path = self.relative_log_path("debug.log") diff --git a/test/functional/feature_longterm_lockin.py b/test/functional/feature_longterm_lockin.py index d3d95b4d40..d42f1d6e27 100755 --- a/test/functional/feature_longterm_lockin.py +++ b/test/functional/feature_longterm_lockin.py @@ -19,7 +19,6 @@ def set_test_params(self): self.extra_args = [['-dummypos=0', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-dakotacrescentheight=1', '-eunosheight=1', '-eunospayaheight=140'], ['-dummypos=0', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-dakotacrescentheight=1', '-eunosheight=1', '-eunospayaheight=140']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_masternode_operator.py b/test/functional/feature_masternode_operator.py index 51075ea8e9..273057dcc3 100755 --- a/test/functional/feature_masternode_operator.py +++ b/test/functional/feature_masternode_operator.py @@ -17,7 +17,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node0_keys = self.nodes[0].get_genesis_keys() node1_keys = self.nodes[1].get_genesis_keys() diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py index f186b0efbf..9ed0d035c2 100755 --- a/test/functional/feature_maxuploadtarget.py +++ b/test/functional/feature_maxuploadtarget.py @@ -45,7 +45,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Before we connect anything, we first set the time on the node # to be in the past, otherwise things break because the CNode diff --git a/test/functional/feature_median_time.py b/test/functional/feature_median_time.py index 116bc868ab..18ce1da2f0 100755 --- a/test/functional/feature_median_time.py +++ b/test/functional/feature_median_time.py @@ -31,7 +31,6 @@ def GenerateBlocks(self, blocks): self.nodes[0].set_mocktime(int(time.time()) + randint(10, 60)) self.nodes[0].generate(1) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(11) assert_equal(self.nodes[0].getblock(self.nodes[0].getblockhash(self.nodes[0].getblockcount()))['mediantime'], self.CalcMedianTime()) diff --git a/test/functional/feature_mempool_dakota.py b/test/functional/feature_mempool_dakota.py index 7fea6f3b4c..b03a18428d 100755 --- a/test/functional/feature_mempool_dakota.py +++ b/test/functional/feature_mempool_dakota.py @@ -21,7 +21,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-dakotaheight=100'], ] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_migrate_v1_in_futures.py b/test/functional/feature_migrate_v1_in_futures.py index d00fb453db..7139fef531 100755 --- a/test/functional/feature_migrate_v1_in_futures.py +++ b/test/functional/feature_migrate_v1_in_futures.py @@ -18,7 +18,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=1']] - @DefiTestFramework.rollback def run_test(self): # Set up tokens diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py index 8198159557..977214ee89 100755 --- a/test/functional/feature_minchainwork.py +++ b/test/functional/feature_minchainwork.py @@ -41,7 +41,6 @@ def setup_network(self): for i in range(self.num_nodes-1): connect_nodes(self.nodes[i+1], i) - @DefiTestFramework.rollback def run_test(self): # Start building a chain on node0. node2 shouldn't be able to sync until node1's # minchainwork is exceeded diff --git a/test/functional/feature_mine_cached.py b/test/functional/feature_mine_cached.py index 118445d20a..546d045a6b 100755 --- a/test/functional/feature_mine_cached.py +++ b/test/functional/feature_mine_cached.py @@ -26,7 +26,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'], ] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_negative_interest.py b/test/functional/feature_negative_interest.py index 2d81690ba2..4da02842df 100755 --- a/test/functional/feature_negative_interest.py +++ b/test/functional/feature_negative_interest.py @@ -1006,7 +1006,6 @@ def various_payback_tests(self): [balanceDUSDafter, _] = self.nodes[0].getaccount(self.account)[0].split('@') assert_equal(Decimal(balanceDUSDafter), Decimal(balanceDUSDbefore) - Decimal('1.00000000')) - @DefiTestFramework.rollback def run_test(self): self.setup() self.vault_interest_zero() diff --git a/test/functional/feature_negative_loan_interest.py b/test/functional/feature_negative_loan_interest.py index b44a48efa9..0529d8003a 100755 --- a/test/functional/feature_negative_loan_interest.py +++ b/test/functional/feature_negative_loan_interest.py @@ -19,7 +19,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=1','-jellyfish_regtest=1', '-simulatemainnet=1', '-negativeinterest=1']] - @DefiTestFramework.rollback def run_test(self): # Create tokens for tests self.setup_test_tokens() diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py index b4e9a7d2dc..c6241d1b62 100755 --- a/test/functional/feature_notifications.py +++ b/test/functional/feature_notifications.py @@ -32,7 +32,6 @@ def setup_network(self): "-walletnotify=echo > {}".format(os.path.join(self.walletnotify_dir, '%s'))]] super().setup_network() - @DefiTestFramework.rollback def run_test(self): self.log.info("test -blocknotify") block_count = 10 diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py index 922ec90eda..6d6e3737aa 100755 --- a/test/functional/feature_nulldummy.py +++ b/test/functional/feature_nulldummy.py @@ -44,7 +44,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.address = self.nodes[0].getnewaddress() self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address])['address'] diff --git a/test/functional/feature_on_chain_government.py b/test/functional/feature_on_chain_government.py index daf32920f0..2b0262fb1b 100755 --- a/test/functional/feature_on_chain_government.py +++ b/test/functional/feature_on_chain_government.py @@ -25,7 +25,6 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-subsidytest=1'], ] - @DefiTestFramework.rollback def run_test(self): # Get MN addresses diff --git a/test/functional/feature_on_chain_government_fee_distribution.py b/test/functional/feature_on_chain_government_fee_distribution.py index f4a1a71577..f18759fabc 100755 --- a/test/functional/feature_on_chain_government_fee_distribution.py +++ b/test/functional/feature_on_chain_government_fee_distribution.py @@ -140,7 +140,6 @@ def setup(self): self.sync_blocks() - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_on_chain_government_govvar_update.py b/test/functional/feature_on_chain_government_govvar_update.py index bb1bd24f16..e4c3ac9803 100755 --- a/test/functional/feature_on_chain_government_govvar_update.py +++ b/test/functional/feature_on_chain_government_govvar_update.py @@ -571,7 +571,6 @@ def setup(self): self.sync_blocks(timeout=120) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_on_chain_government_voting_period_alignment.py b/test/functional/feature_on_chain_government_voting_period_alignment.py index 1536653104..1cba5342bc 100755 --- a/test/functional/feature_on_chain_government_voting_period_alignment.py +++ b/test/functional/feature_on_chain_government_voting_period_alignment.py @@ -23,7 +23,6 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-subsidytest=1'], ] - @DefiTestFramework.rollback def run_test(self): # Get MN addresses diff --git a/test/functional/feature_oracles.py b/test/functional/feature_oracles.py index 66b6193ae9..175f8b5a75 100755 --- a/test/functional/feature_oracles.py +++ b/test/functional/feature_oracles.py @@ -97,7 +97,6 @@ def synchronize(self, node: int): self.nodes[node].generate(1) self.sync_blocks([self.nodes[0], self.nodes[1], self.nodes[2]]) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(200) self.sync_blocks() diff --git a/test/functional/feature_poolpair.py b/test/functional/feature_poolpair.py index 2e990ff75b..fe494e3d25 100755 --- a/test/functional/feature_poolpair.py +++ b/test/functional/feature_poolpair.py @@ -28,7 +28,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_poolpair_liquidity.py b/test/functional/feature_poolpair_liquidity.py index 9848cd8cb6..d7a13a1534 100755 --- a/test/functional/feature_poolpair_liquidity.py +++ b/test/functional/feature_poolpair_liquidity.py @@ -34,7 +34,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_poolswap.py b/test/functional/feature_poolswap.py index 0dbde44bab..19ef7080da 100755 --- a/test/functional/feature_poolswap.py +++ b/test/functional/feature_poolswap.py @@ -569,7 +569,6 @@ def revert_to_initial_state(self): assert_equal(len(self.nodes[2].listpoolpairs()), 0) - @DefiTestFramework.rollback def run_test(self): self.setup() self.test_swap_with_no_liquidity() diff --git a/test/functional/feature_poolswap_composite.py b/test/functional/feature_poolswap_composite.py index f4bcb9fcfd..b1fe7a1437 100755 --- a/test/functional/feature_poolswap_composite.py +++ b/test/functional/feature_poolswap_composite.py @@ -24,7 +24,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=106', '-bayfrontgardensheight=107', '-dakotaheight=108', '-eunosheight=109', '-fortcanningheight=110', '-grandcentralheight=170', '-fortcanninghillheight=200'], ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=106', '-bayfrontgardensheight=107', '-dakotaheight=108', '-eunosheight=109', '-fortcanningheight=110', '-grandcentralheight=170', '-fortcanninghillheight=200']] - @DefiTestFramework.rollback def run_test(self): # Create tokens diff --git a/test/functional/feature_poolswap_mainnet.py b/test/functional/feature_poolswap_mainnet.py index dedb6a01c5..53da32f440 100755 --- a/test/functional/feature_poolswap_mainnet.py +++ b/test/functional/feature_poolswap_mainnet.py @@ -333,7 +333,6 @@ def test_swap_full_amount_of_one_side_of_pool(self): assert_equal(poolpair_info_GS['1']['reserveA'], Decimal('9950000.00000203')) assert_equal(poolpair_info_GS['1']['reserveB'], Decimal('251256.28140704')) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_poolswap_mechanism.py b/test/functional/feature_poolswap_mechanism.py index ba99c0c532..b0df3c1166 100755 --- a/test/functional/feature_poolswap_mechanism.py +++ b/test/functional/feature_poolswap_mechanism.py @@ -233,7 +233,6 @@ def poolswap(self, nodes): reserveB = self.nodes[0].getpoolpair(pool, True)[idPool]['reserveB'] assert_equal(str(reserveB), format(newReserveB, '.8f')) - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_prevent_bad_tx_propagation.py b/test/functional/feature_prevent_bad_tx_propagation.py index 14e1b5fd97..23c7d89c96 100755 --- a/test/functional/feature_prevent_bad_tx_propagation.py +++ b/test/functional/feature_prevent_bad_tx_propagation.py @@ -15,7 +15,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50']] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(120) diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index c3f95fe8c6..6a96c3bec3 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -146,7 +146,6 @@ def node_test(self, node, proxies, auth, test_onion=True): return rv - @DefiTestFramework.rollback def run_test(self): # basic -proxy self.node_test(self.nodes[0], [self.serv1, self.serv1, self.serv1, self.serv1], False) diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index ed6a73f8ba..de972d1387 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -346,7 +346,6 @@ def wallet_test(self): self.start_node(5, extra_args=["-prune=550"]) self.log.info("Success") - @DefiTestFramework.rollback def run_test(self): self.log.info("Warning! This test requires 4GB of disk space") diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py index 557866344d..a773801646 100755 --- a/test/functional/feature_rbf.py +++ b/test/functional/feature_rbf.py @@ -79,7 +79,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Leave IBD self.nodes[0].generate(1) diff --git a/test/functional/feature_reindex.py b/test/functional/feature_reindex.py index c806aac48f..303418f018 100755 --- a/test/functional/feature_reindex.py +++ b/test/functional/feature_reindex.py @@ -27,7 +27,6 @@ def reindex(self, justchainstate=False): wait_until(lambda: self.nodes[0].getblockcount() == blockcount) self.log.info("Success") - @DefiTestFramework.rollback def run_test(self): self.reindex(False) self.reindex(True) diff --git a/test/functional/feature_reject_customtxs.py b/test/functional/feature_reject_customtxs.py index c8a5ca9d80..e11272d74c 100755 --- a/test/functional/feature_reject_customtxs.py +++ b/test/functional/feature_reject_customtxs.py @@ -16,7 +16,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-dakotaheight=1', '-fortcanningheight=120']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_restore_utxo.py b/test/functional/feature_restore_utxo.py index bc7c89ed87..a5f862ca2e 100755 --- a/test/functional/feature_restore_utxo.py +++ b/test/functional/feature_restore_utxo.py @@ -16,7 +16,6 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1'], ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/feature_rpcstats.py b/test/functional/feature_rpcstats.py index 79989d3253..5a7acb6efa 100755 --- a/test/functional/feature_rpcstats.py +++ b/test/functional/feature_rpcstats.py @@ -22,7 +22,6 @@ def set_test_params(self): ['-acindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-rpcstats=0'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py index 97ce3b4e69..ecefa10335 100755 --- a/test/functional/feature_segwit.py +++ b/test/functional/feature_segwit.py @@ -95,7 +95,6 @@ def skip_mine(self, node, txid, sign, redeem_script=""): def fail_accept(self, node, error_msg, txid, sign, redeem_script=""): assert_raises_rpc_error(-26, error_msg, send_to_witness, use_p2wsh=1, node=node, utxo=getutxo(txid), pubkey=self.pubkey[0], encode_p2sh=False, amount=Decimal("49.998"), sign=sign, insert_redeem_script=redeem_script) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(161) # block 161 diff --git a/test/functional/feature_sendtokenstoaddress.py b/test/functional/feature_sendtokenstoaddress.py index 0191f85b8d..c4e0b773a8 100755 --- a/test/functional/feature_sendtokenstoaddress.py +++ b/test/functional/feature_sendtokenstoaddress.py @@ -24,7 +24,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontgardensheight=50', '-datacarriersize=1000'], ] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_sendutxosfrom.py b/test/functional/feature_sendutxosfrom.py index 703cd79096..ee581eef28 100755 --- a/test/functional/feature_sendutxosfrom.py +++ b/test/functional/feature_sendutxosfrom.py @@ -17,7 +17,6 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-txindex=1'], ['-txnotokens=0', '-amkheight=1', '-txindex=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(110) self.sync_blocks() diff --git a/test/functional/feature_setgov.py b/test/functional/feature_setgov.py index 920c94c6d0..5d7b435c60 100755 --- a/test/functional/feature_setgov.py +++ b/test/functional/feature_setgov.py @@ -24,7 +24,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningcrunchheight=1200', '-fortcanningspringheight=1250', '-grandcentralheight=1300', '-subsidytest=1'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningcrunchheight=1200', '-fortcanningspringheight=1250', '-grandcentralheight=1300', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.setup_tokens() diff --git a/test/functional/feature_shutdown.py b/test/functional/feature_shutdown.py index fd071184a1..64473befaf 100755 --- a/test/functional/feature_shutdown.py +++ b/test/functional/feature_shutdown.py @@ -18,7 +18,6 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): node = get_rpc_proxy(self.nodes[0].url, 1, timeout=600, coveragedir=self.nodes[0].coverage_dir) # Force connection establishment by executing a dummy command. diff --git a/test/functional/feature_skip_collateral_factor_check.py b/test/functional/feature_skip_collateral_factor_check.py index 12aa1ce08b..1c58501a66 100755 --- a/test/functional/feature_skip_collateral_factor_check.py +++ b/test/functional/feature_skip_collateral_factor_check.py @@ -15,7 +15,6 @@ def set_test_params(self): self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanningroadheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-fortcanningepilogueheight=200', '-regtest-skip-loan-collateral-validation', '-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): # Generate chain self.nodes[0].generate(120) diff --git a/test/functional/feature_smart_contracts.py b/test/functional/feature_smart_contracts.py index 47f04076a7..edeb1cc4d2 100755 --- a/test/functional/feature_smart_contracts.py +++ b/test/functional/feature_smart_contracts.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1010', '-subsidytest=1', '-txindex=1', '-jellyfish_regtest=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1000) diff --git a/test/functional/feature_split_migrate_lock.py b/test/functional/feature_split_migrate_lock.py index 9ae3df4b1a..cde045cf8d 100755 --- a/test/functional/feature_split_migrate_lock.py +++ b/test/functional/feature_split_migrate_lock.py @@ -29,7 +29,6 @@ def set_test_params(self): '-grandcentralheight=200', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.setup_test_tokens() self.test_unlock_migration() diff --git a/test/functional/feature_stored_interest.py b/test/functional/feature_stored_interest.py index 15bc662404..20bea881df 100755 --- a/test/functional/feature_stored_interest.py +++ b/test/functional/feature_stored_interest.py @@ -18,7 +18,6 @@ def set_test_params(self): self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-jellyfish_regtest=1', '-negativeinterest=1']] - @DefiTestFramework.rollback def run_test(self): # Create tokens for tests self.setup_test_tokens() diff --git a/test/functional/feature_testpoolswap.py b/test/functional/feature_testpoolswap.py index f8319c6a61..be076f8bca 100755 --- a/test/functional/feature_testpoolswap.py +++ b/test/functional/feature_testpoolswap.py @@ -262,7 +262,6 @@ def test_testpoolswap_with_multi_pool_fee(self, swap_fn, tokenFrom, path): self.nodes[0].generate(1) self.assert_testpoolswap_amount(swap_fn, tokenFrom, path) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/feature_token_fork.py b/test/functional/feature_token_fork.py index ed1439d8d0..171f857835 100755 --- a/test/functional/feature_token_fork.py +++ b/test/functional/feature_token_fork.py @@ -19,7 +19,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=120']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_token_lock.py b/test/functional/feature_token_lock.py index cb4539040a..169809fab5 100755 --- a/test/functional/feature_token_lock.py +++ b/test/functional/feature_token_lock.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningcrunchheight=200', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_token_merge.py b/test/functional/feature_token_merge.py index e172e6fea5..75ca0d4da8 100755 --- a/test/functional/feature_token_merge.py +++ b/test/functional/feature_token_merge.py @@ -431,7 +431,6 @@ def check_amounts_on_merge(self, poolId, tokenId, revert=False): self.rollback_to(revertHeight) return new_token_id - @DefiTestFramework.rollback def run_test(self): self.setup() self.check_attributes_on_merge(self.idT1, revert=True) diff --git a/test/functional/feature_token_merge_usd_value.py b/test/functional/feature_token_merge_usd_value.py index db695917af..ab36e12b81 100755 --- a/test/functional/feature_token_merge_usd_value.py +++ b/test/functional/feature_token_merge_usd_value.py @@ -314,7 +314,6 @@ def test_values_after_token_unlock(self): assert_greater_than_or_equal(vault["informativeRatio"], 0) assert_greater_than_or_equal(vault["collateralRatio"], 0) - @DefiTestFramework.rollback def run_test(self): self.setup() self.compare_usd_account_value_on_merge(revert=True) diff --git a/test/functional/feature_token_split.py b/test/functional/feature_token_split.py index b0ece4a9db..0e12c64deb 100755 --- a/test/functional/feature_token_split.py +++ b/test/functional/feature_token_split.py @@ -23,7 +23,6 @@ def set_test_params(self): self.extra_args = [ ['-vaultindex=1', '-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', f'-fortcanningcrunchheight={self.fort_canning_crunch}', '-subsidytest=1']] - @DefiTestFramework.rollback def run_test(self): self.setup_test_tokens() self.setup_test_pools() diff --git a/test/functional/feature_token_split_mechanism.py b/test/functional/feature_token_split_mechanism.py index 9738b0bdc3..fc15f2c259 100755 --- a/test/functional/feature_token_split_mechanism.py +++ b/test/functional/feature_token_split_mechanism.py @@ -439,7 +439,6 @@ def check_amounts_on_split(self, poolId, tokenId, revert=False): self.rollback_to(revertHeight) return new_token_id - @DefiTestFramework.rollback def run_test(self): self.setup() initialStateBlock = self.nodes[0].getblockcount() diff --git a/test/functional/feature_token_split_usd_value.py b/test/functional/feature_token_split_usd_value.py index 3099f60a31..fcc6fcb5cb 100755 --- a/test/functional/feature_token_split_usd_value.py +++ b/test/functional/feature_token_split_usd_value.py @@ -324,7 +324,6 @@ def test_values_after_token_unlock(self): assert_greater_than_or_equal(vault["informativeRatio"], 0) assert_greater_than_or_equal(vault["collateralRatio"], 0) - @DefiTestFramework.rollback def run_test(self): self.setup() assert_equal(1,1) # Make linter happy for now diff --git a/test/functional/feature_tokens_basic.py b/test/functional/feature_tokens_basic.py index 2898d99070..db2640971a 100755 --- a/test/functional/feature_tokens_basic.py +++ b/test/functional/feature_tokens_basic.py @@ -25,7 +25,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_dat.py b/test/functional/feature_tokens_dat.py index e44e65df15..d3cda0c573 100755 --- a/test/functional/feature_tokens_dat.py +++ b/test/functional/feature_tokens_dat.py @@ -28,7 +28,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_minting.py b/test/functional/feature_tokens_minting.py index e32f5cd390..1f819b968a 100755 --- a/test/functional/feature_tokens_minting.py +++ b/test/functional/feature_tokens_minting.py @@ -19,7 +19,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50'], ['-txnotokens=0', '-amkheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_tokens_multisig.py b/test/functional/feature_tokens_multisig.py index ba7ebcf833..a26d305260 100755 --- a/test/functional/feature_tokens_multisig.py +++ b/test/functional/feature_tokens_multisig.py @@ -15,7 +15,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listtokens()), 1) # only one token == DFI diff --git a/test/functional/feature_uacomment.py b/test/functional/feature_uacomment.py index 2bdc0e35e5..9452110c5e 100755 --- a/test/functional/feature_uacomment.py +++ b/test/functional/feature_uacomment.py @@ -16,7 +16,6 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): self.log.info("test multiple -uacomment") test_uacomment = self.nodes[0].getnetworkinfo()["subversion"][-12:-1] diff --git a/test/functional/feature_update_mn.py b/test/functional/feature_update_mn.py index da4eff9ea5..0c70fa6358 100755 --- a/test/functional/feature_update_mn.py +++ b/test/functional/feature_update_mn.py @@ -23,7 +23,6 @@ def set_test_params(self): ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140', '-fortcanningheight=145'], ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140', '-fortcanningheight=145']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) self.nodes[0].generate(100) diff --git a/test/functional/feature_vault_pct_check_factor.py b/test/functional/feature_vault_pct_check_factor.py index 5b76e46530..895b8e349d 100755 --- a/test/functional/feature_vault_pct_check_factor.py +++ b/test/functional/feature_vault_pct_check_factor.py @@ -236,7 +236,6 @@ def post_FCE_DFI_minimum_check_takeloan(self): self.rollback_to(block_height) self.rollback_checks([vault_id]) - @DefiTestFramework.rollback def run_test(self): self.setup() self.post_FCE_DFI_minimum_check_takeloan() diff --git a/test/functional/feature_versionbits_warning.py b/test/functional/feature_versionbits_warning.py index 719d7ac4f9..93579e9add 100755 --- a/test/functional/feature_versionbits_warning.py +++ b/test/functional/feature_versionbits_warning.py @@ -60,7 +60,6 @@ def versionbits_in_alert_file(self): alert_text = open(self.alert_filename, 'r', encoding='utf8').read() return VB_PATTERN.search(alert_text) is not None - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.add_p2p_connection(P2PInterface()) diff --git a/test/functional/interface_defi_cli.py b/test/functional/interface_defi_cli.py index 5f9064ce40..2dc69c26ea 100755 --- a/test/functional/interface_defi_cli.py +++ b/test/functional/interface_defi_cli.py @@ -12,7 +12,6 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/interface_http.py b/test/functional/interface_http.py index d08f78c42c..00b667fbd0 100755 --- a/test/functional/interface_http.py +++ b/test/functional/interface_http.py @@ -17,7 +17,6 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() - @DefiTestFramework.rollback def run_test(self): ################################################# diff --git a/test/functional/interface_http_cors.py b/test/functional/interface_http_cors.py index 959fb5d0d0..68f9fedd1d 100755 --- a/test/functional/interface_http_cors.py +++ b/test/functional/interface_http_cors.py @@ -16,7 +16,6 @@ def set_test_params(self): self.cors_origin = "http://localhost:8000" self.extra_args = [["-rpcallowcors=" + self.cors_origin]] - @DefiTestFramework.rollback def run_test(self): url = urllib.parse.urlparse(self.nodes[0].url) diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index d7cc9e967d..ae9ff1df98 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -74,7 +74,6 @@ def test_rest_request(self, uri, http_method='GET', req_type=ReqType.JSON, body= elif ret_type == RetType.JSON: return json.loads(resp.read().decode('utf-8'), parse_float=Decimal) - @DefiTestFramework.rollback def run_test(self): self.url = urllib.parse.urlparse(self.nodes[0].url) self.log.info("Mine blocks and send Defi to node 1") diff --git a/test/functional/interface_rpc.py b/test/functional/interface_rpc.py index e95889f2cd..e24593a2cb 100755 --- a/test/functional/interface_rpc.py +++ b/test/functional/interface_rpc.py @@ -66,7 +66,6 @@ def test_http_status_codes(self): expect_http_status(404, -32601, self.nodes[0].invalidmethod) expect_http_status(500, -8, self.nodes[0].getblockhash, 42) - @DefiTestFramework.rollback def run_test(self): self.test_getrpcinfo() self.test_batch_request() diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py index 299b4a1e75..280a3c0c12 100755 --- a/test/functional/interface_zmq.py +++ b/test/functional/interface_zmq.py @@ -42,7 +42,6 @@ def skip_test_if_missing_module(self): self.skip_if_no_py3_zmq() self.skip_if_no_defid_zmq() - @DefiTestFramework.rollback def run_test(self): import zmq self.ctx = zmq.Context() diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 7ea4e5448c..9b5426cdc3 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -48,7 +48,6 @@ def check_mempool_result(self, result_expected, *args, **kwargs): assert_equal(result_expected, result_test) assert_equal(self.nodes[0].getmempoolinfo()['size'], self.mempool_size) # Must not change mempool state - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py index b096ee681c..1fd90168ab 100755 --- a/test/functional/mempool_limit.py +++ b/test/functional/mempool_limit.py @@ -22,7 +22,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): txouts = gen_return_txouts() relayfee = self.nodes[0].getnetworkinfo()['relayfee'] diff --git a/test/functional/mempool_package_onemore.py b/test/functional/mempool_package_onemore.py index 47ab5fa36a..52e170084b 100755 --- a/test/functional/mempool_package_onemore.py +++ b/test/functional/mempool_package_onemore.py @@ -40,7 +40,6 @@ def chain_transaction(self, node, parent_txids, vouts, value, fee, num_outputs): assert len(fulltx['vout']) == num_outputs # make sure we didn't generate a change output return (txid, send_value) - @DefiTestFramework.rollback def run_test(self): # Mine some blocks and have them mature. self.nodes[0].generate(101) diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py index cb5e25d691..3b3ae92efd 100755 --- a/test/functional/mempool_packages.py +++ b/test/functional/mempool_packages.py @@ -40,7 +40,6 @@ def chain_transaction(self, node, parent_txid, vout, value, fee, num_outputs): assert len(fulltx['vout']) == num_outputs # make sure we didn't generate a change output return (txid, send_value) - @DefiTestFramework.rollback def run_test(self): # Mine some blocks and have them mature. self.nodes[0].generate(101) diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py index 754dd7f8de..347dffe96b 100755 --- a/test/functional/mempool_persist.py +++ b/test/functional/mempool_persist.py @@ -50,7 +50,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): chain_height = self.nodes[0].getblockcount() assert_equal(chain_height, 200) diff --git a/test/functional/mempool_reorg.py b/test/functional/mempool_reorg.py index dc91e89689..aaebfad21c 100755 --- a/test/functional/mempool_reorg.py +++ b/test/functional/mempool_reorg.py @@ -22,7 +22,6 @@ def skip_test_if_missing_module(self): alert_filename = None # Set by setup_network - @DefiTestFramework.rollback def run_test(self): # Start with a 200 block chain assert_equal(self.nodes[0].getblockcount(), 200) diff --git a/test/functional/mempool_resurrect.py b/test/functional/mempool_resurrect.py index 5f9cf23bd0..afd2deea2f 100755 --- a/test/functional/mempool_resurrect.py +++ b/test/functional/mempool_resurrect.py @@ -16,7 +16,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node0_address = self.nodes[0].getnewaddress() # Spend block 1/2/3's coinbase transactions diff --git a/test/functional/mempool_spend_coinbase.py b/test/functional/mempool_spend_coinbase.py index a194253d85..9095fee160 100755 --- a/test/functional/mempool_spend_coinbase.py +++ b/test/functional/mempool_spend_coinbase.py @@ -24,7 +24,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): chain_height = self.nodes[0].getblockcount() assert_equal(chain_height, 200) diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index 378ea2dd79..b9013e32a0 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -58,7 +58,6 @@ def mine_chain(self): self.restart_node(0) connect_nodes_bi(self.nodes, 0, 1) - @DefiTestFramework.rollback def run_test(self): self.mine_chain() node = self.nodes[0] diff --git a/test/functional/mining_getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py index ff69c6a97e..4893667022 100755 --- a/test/functional/mining_getblocktemplate_longpoll.py +++ b/test/functional/mining_getblocktemplate_longpoll.py @@ -31,7 +31,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info("Warning: this test will take about 70 seconds in the best case. Be patient.") self.nodes[0].generate(10) diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py index fc522089c9..ac780175ed 100755 --- a/test/functional/mining_prioritisetransaction.py +++ b/test/functional/mining_prioritisetransaction.py @@ -22,7 +22,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Test `prioritisetransaction` required parameters assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction) diff --git a/test/functional/p2p_blocksonly.py b/test/functional/p2p_blocksonly.py index fe46c9bd78..aea70f185a 100755 --- a/test/functional/p2p_blocksonly.py +++ b/test/functional/p2p_blocksonly.py @@ -16,7 +16,6 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [["-blocksonly"]] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py index 896a2c1f0a..88f1c5842b 100755 --- a/test/functional/p2p_compactblocks.py +++ b/test/functional/p2p_compactblocks.py @@ -794,7 +794,6 @@ def announce_cmpct_block(node, peer): stalling_peer.send_and_ping(msg) assert_equal(int(node.getbestblockhash(), 16), block.sha256) - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections self.segwit_node = self.nodes[0].add_p2p_connection(TestP2PConn(cmpct_version=2)) diff --git a/test/functional/p2p_disconnect_ban.py b/test/functional/p2p_disconnect_ban.py index 5a894a7dd0..62772d2c13 100755 --- a/test/functional/p2p_disconnect_ban.py +++ b/test/functional/p2p_disconnect_ban.py @@ -18,7 +18,6 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [['-dummypos=1'], ['-dummypos=1']] - @DefiTestFramework.rollback def run_test(self): self.log.info("Test setban and listbanned RPCs") diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py index d119bf773b..7e785f51d2 100755 --- a/test/functional/p2p_feefilter.py +++ b/test/functional/p2p_feefilter.py @@ -45,7 +45,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node1 = self.nodes[1] node0 = self.nodes[0] diff --git a/test/functional/p2p_fingerprint.py b/test/functional/p2p_fingerprint.py index 8aa71385ab..bd8d781749 100755 --- a/test/functional/p2p_fingerprint.py +++ b/test/functional/p2p_fingerprint.py @@ -73,7 +73,6 @@ def last_header_equals(self, expected_hash, node): # by the node while recent stale blocks and old active chain blocks are. # This does not currently test that stale blocks timestamped within the # last month but that have over a month's worth of work are also withheld. - @DefiTestFramework.rollback def run_test(self): node0 = self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py index f97357bb02..9f9982210e 100755 --- a/test/functional/p2p_invalid_block.py +++ b/test/functional/p2p_invalid_block.py @@ -24,7 +24,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [["-whitelist=127.0.0.1", "-dummypos=1"]] - @DefiTestFramework.rollback def run_test(self): # Add p2p connection to node0 node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/p2p_invalid_locator.py b/test/functional/p2p_invalid_locator.py index efd6c661ac..f164402c47 100755 --- a/test/functional/p2p_invalid_locator.py +++ b/test/functional/p2p_invalid_locator.py @@ -16,7 +16,6 @@ def set_test_params(self): self.setup_clean_chain = False self.extra_args = [["-dummypos=1"]] - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node node.generate(1) # Get node out of IBD diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 3e0f4b2293..24fd93c3c4 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -32,7 +32,6 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): """ . Test msg header diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py index d461059c9c..b82ed9fb3a 100755 --- a/test/functional/p2p_invalid_tx.py +++ b/test/functional/p2p_invalid_tx.py @@ -46,7 +46,6 @@ def reconnect_p2p(self, **kwargs): self.nodes[0].disconnect_p2ps() self.bootstrap_p2p(**kwargs) - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # convenience reference to the node diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index c8d3816c5e..602c0cffd1 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -94,7 +94,6 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [['-banscore=' + str(banscore)]] - @DefiTestFramework.rollback def run_test(self): no_version_bannode = self.nodes[0].add_p2p_connection(CNodeNoVersionBan(), send_version=False, wait_for_verack=False) no_version_idlenode = self.nodes[0].add_p2p_connection(CNodeNoVersionIdle(), send_version=False, wait_for_verack=False) diff --git a/test/functional/p2p_leak_tx.py b/test/functional/p2p_leak_tx.py index e46c6db8fc..221569e5f9 100755 --- a/test/functional/p2p_leak_tx.py +++ b/test/functional/p2p_leak_tx.py @@ -24,7 +24,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): gen_node = self.nodes[0] # The block and tx generating node gen_node.generate(1) diff --git a/test/functional/p2p_mempool.py b/test/functional/p2p_mempool.py index 158d330bfe..2b80f979a6 100755 --- a/test/functional/p2p_mempool.py +++ b/test/functional/p2p_mempool.py @@ -19,7 +19,6 @@ def set_test_params(self): self.num_nodes = 1 self.extra_args = [["-peerbloomfilters=0"]] - @DefiTestFramework.rollback def run_test(self): # Add a p2p connection self.nodes[0].add_p2p_connection(P2PInterface()) diff --git a/test/functional/p2p_node_network_limited.py b/test/functional/p2p_node_network_limited.py index c6df07234d..fe9bb99b7e 100755 --- a/test/functional/p2p_node_network_limited.py +++ b/test/functional/p2p_node_network_limited.py @@ -55,7 +55,6 @@ def setup_network(self): self.start_nodes() self.import_deterministic_coinbase_privkeys() - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0].add_p2p_connection(P2PIgnoreInv()) diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py index 018b6fcddb..e540e05e14 100755 --- a/test/functional/p2p_permissions.py +++ b/test/functional/p2p_permissions.py @@ -21,7 +21,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[],[]] - @DefiTestFramework.rollback def run_test(self): self.checkpermission( # default permissions (no specific permissions) diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index ba7900098c..b424ad96cd 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -219,7 +219,6 @@ def update_witness_block_with_transactions(self, block, tx_list, nonce=0): add_witness_commitment(block, nonce) block.solve() - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # self.test_node sets NODE_WITNESS|NODE_NETWORK diff --git a/test/functional/p2p_segwit2.py b/test/functional/p2p_segwit2.py index 2e5d7155e0..9c3d1430f3 100755 --- a/test/functional/p2p_segwit2.py +++ b/test/functional/p2p_segwit2.py @@ -183,7 +183,6 @@ def update_witness_block_with_transactions(self, block, tx_list, nonce=0): add_witness_commitment(block, nonce) block.solve() - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # self.test_node sets NODE_WITNESS|NODE_NETWORK diff --git a/test/functional/p2p_sendheaders.py b/test/functional/p2p_sendheaders.py index 22e06b6103..fedb5b1b7b 100755 --- a/test/functional/p2p_sendheaders.py +++ b/test/functional/p2p_sendheaders.py @@ -253,7 +253,6 @@ def mine_reorg(self, length): self.sync_blocks(self.nodes, wait=0.1) return [int(x, 16) for x in all_hashes] - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections inv_node = self.nodes[0].add_p2p_connection(BaseNode()) diff --git a/test/functional/p2p_timeouts.py b/test/functional/p2p_timeouts.py index 4367b5822b..e5636791f2 100755 --- a/test/functional/p2p_timeouts.py +++ b/test/functional/p2p_timeouts.py @@ -39,7 +39,6 @@ def set_test_params(self): # set timeout to receive version/verack to 3 seconds self.extra_args = [["-peertimeout=3"]] - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections no_verack_node = self.nodes[0].add_p2p_connection(TestP2PConn()) diff --git a/test/functional/p2p_tx_download.py b/test/functional/p2p_tx_download.py index 1f9879f92f..00dfa50b3f 100755 --- a/test/functional/p2p_tx_download.py +++ b/test/functional/p2p_tx_download.py @@ -157,7 +157,6 @@ def test_in_flight_max(self): wait_until(lambda: p.tx_getdata_count == MAX_GETDATA_IN_FLIGHT + 2) self.nodes[0].setmocktime(0) - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections self.peers = [] diff --git a/test/functional/p2p_unrequested_blocks.py b/test/functional/p2p_unrequested_blocks.py index 430ed40860..551da113e8 100755 --- a/test/functional/p2p_unrequested_blocks.py +++ b/test/functional/p2p_unrequested_blocks.py @@ -78,7 +78,6 @@ def setup_network(self): # with nMinimumChainWork. self.setup_nodes() - @DefiTestFramework.rollback def run_test(self): # Setup the p2p connections # test_node connects to node0 (not whitelisted) diff --git a/test/functional/rpc_bind.py b/test/functional/rpc_bind.py index acd0f3f59e..4710329057 100755 --- a/test/functional/rpc_bind.py +++ b/test/functional/rpc_bind.py @@ -59,7 +59,6 @@ def run_allowip_test(self, allow_ips, rpchost, rpcport): node.getnetworkinfo() self.stop_nodes() - @DefiTestFramework.rollback def run_test(self): # due to OS-specific network stats queries, this test works only on Linux if sum([self.options.run_ipv4, self.options.run_ipv6, self.options.run_nonloopback]) > 1: diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 874faaab98..688b71cc04 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -50,7 +50,6 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): self.mine_chain() self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py index 98f30eb942..60c8fa1736 100755 --- a/test/functional/rpc_createmultisig.py +++ b/test/functional/rpc_createmultisig.py @@ -30,7 +30,6 @@ def get_keys(self): self.priv = [node1.dumpprivkey(a) for a in add] self.final = node2.getnewaddress() - @DefiTestFramework.rollback def run_test(self): node0, node1, node2 = self.nodes diff --git a/test/functional/rpc_decodescript.py b/test/functional/rpc_decodescript.py index 3e5630cb56..2742bd08e6 100755 --- a/test/functional/rpc_decodescript.py +++ b/test/functional/rpc_decodescript.py @@ -225,7 +225,6 @@ def decoderawtransaction_asm_sighashtype(self): rpc_result = self.nodes[0].decoderawtransaction(txSave.serialize().hex()) assert_equal('OP_RETURN 3011020701010101010101020601010101010101', rpc_result['vin'][0]['scriptSig']['asm']) - @DefiTestFramework.rollback def run_test(self): self.decodescript_script_sig() self.decodescript_script_pub_key() diff --git a/test/functional/rpc_deprecated.py b/test/functional/rpc_deprecated.py index de068f3cb7..511c60e0ac 100755 --- a/test/functional/rpc_deprecated.py +++ b/test/functional/rpc_deprecated.py @@ -12,7 +12,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[], []] - @DefiTestFramework.rollback def run_test(self): # This test should be used to verify correct behaviour of deprecated # RPC methods with and without the -deprecatedrpc flags. For example: diff --git a/test/functional/rpc_deriveaddresses.py b/test/functional/rpc_deriveaddresses.py index 0f64bb2582..7d95be653e 100755 --- a/test/functional/rpc_deriveaddresses.py +++ b/test/functional/rpc_deriveaddresses.py @@ -12,7 +12,6 @@ def set_test_params(self): self.num_nodes = 1 self.supports_cli = 1 - @DefiTestFramework.rollback def run_test(self): assert_raises_rpc_error(-5, "Missing checksum", self.nodes[0].deriveaddresses, "a") diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 68b886954f..507afe72a1 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -40,7 +40,6 @@ def setup_network(self): connect_nodes_bi(self.nodes, 0, 2) connect_nodes_bi(self.nodes, 0, 3) - @DefiTestFramework.rollback def run_test(self): self.min_relay_tx_fee = self.nodes[0].getnetworkinfo()['relayfee'] # This test is not meant to test fee estimation and we'd like diff --git a/test/functional/rpc_getaccounthistory.py b/test/functional/rpc_getaccounthistory.py index b3718dc9f4..06c8eadb6d 100755 --- a/test/functional/rpc_getaccounthistory.py +++ b/test/functional/rpc_getaccounthistory.py @@ -20,7 +20,6 @@ def set_test_params(self): ['-acindex=1', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) num_tokens = len(self.nodes[0].listtokens()) diff --git a/test/functional/rpc_getblockfilter.py b/test/functional/rpc_getblockfilter.py index f474d705a9..602bac995c 100755 --- a/test/functional/rpc_getblockfilter.py +++ b/test/functional/rpc_getblockfilter.py @@ -18,7 +18,6 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-blockfilterindex"], []] - @DefiTestFramework.rollback def run_test(self): # Create two chains by disconnecting nodes 0 & 1, mining, then reconnecting disconnect_nodes(self.nodes[0], 1) diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py index 623119d194..54496375b5 100755 --- a/test/functional/rpc_getblockstats.py +++ b/test/functional/rpc_getblockstats.py @@ -86,7 +86,6 @@ def load_test_data(self, filename): self.nodes[0].submitblock(b) - @DefiTestFramework.rollback def run_test(self): test_data = os.path.join(TESTSDIR, self.options.test_data) if self.options.gen_test_data: diff --git a/test/functional/rpc_getchaintips.py b/test/functional/rpc_getchaintips.py index ecddbb217e..c4416210ea 100755 --- a/test/functional/rpc_getchaintips.py +++ b/test/functional/rpc_getchaintips.py @@ -17,7 +17,6 @@ class GetChainTipsTest (DefiTestFramework): def set_test_params(self): self.num_nodes = 4 - @DefiTestFramework.rollback def run_test(self): tips = self.nodes[0].getchaintips() assert_equal(len(tips), 1) diff --git a/test/functional/rpc_getcustomtx.py b/test/functional/rpc_getcustomtx.py index d379db965d..36aa876db7 100755 --- a/test/functional/rpc_getcustomtx.py +++ b/test/functional/rpc_getcustomtx.py @@ -32,7 +32,6 @@ def check_result(self, result): assert_equal(result['blockhash'], blockhash) assert_equal(result['confirmations'], 1) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) self.sync_blocks() diff --git a/test/functional/rpc_getmininginfo.py b/test/functional/rpc_getmininginfo.py index f0809fa6da..45ce1b5807 100755 --- a/test/functional/rpc_getmininginfo.py +++ b/test/functional/rpc_getmininginfo.py @@ -18,7 +18,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node0_keys = self.nodes[0].get_genesis_keys() node1_keys = self.nodes[1].get_genesis_keys() diff --git a/test/functional/rpc_getstoredinterest.py b/test/functional/rpc_getstoredinterest.py index adf0002d16..8a91fedc49 100755 --- a/test/functional/rpc_getstoredinterest.py +++ b/test/functional/rpc_getstoredinterest.py @@ -1241,7 +1241,6 @@ def setup(self): self.nodes[0].generate(10) self.setup_height = self.nodes[0].getblockcount() - @DefiTestFramework.rollback def run_test(self): rollback = True diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py index f4af633790..d27d7c4b9b 100755 --- a/test/functional/rpc_help.py +++ b/test/functional/rpc_help.py @@ -14,7 +14,6 @@ class HelpRpcTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): self.test_categories() self.dump_help() diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py index e8781ab7bf..390e57fd76 100755 --- a/test/functional/rpc_invalidateblock.py +++ b/test/functional/rpc_invalidateblock.py @@ -21,7 +21,6 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() - @DefiTestFramework.rollback def run_test(self): self.log.info("Make sure we repopulate setBlockIndexCandidates after InvalidateBlock:") self.log.info("Mine 4 blocks on Node 0") diff --git a/test/functional/rpc_listaccounthistory.py b/test/functional/rpc_listaccounthistory.py index 7f598522a7..60af58c64a 100755 --- a/test/functional/rpc_listaccounthistory.py +++ b/test/functional/rpc_listaccounthistory.py @@ -26,7 +26,6 @@ def set_test_params(self): '-grandcentralheight=51'], ] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) num_tokens = len(self.nodes[0].listtokens()) diff --git a/test/functional/rpc_listgovproposals.py b/test/functional/rpc_listgovproposals.py index c546507d76..9c06118794 100755 --- a/test/functional/rpc_listgovproposals.py +++ b/test/functional/rpc_listgovproposals.py @@ -280,7 +280,6 @@ def create_10_proposals_and_aprove_half(self): prop_list = self.nodes[0].listgovproposals("all", "completed", 4) assert_equal(len(prop_list), 5) - @DefiTestFramework.rollback def run_test(self): self.setup() diff --git a/test/functional/rpc_listvaulthistory.py b/test/functional/rpc_listvaulthistory.py index 947304e388..930695f5b9 100755 --- a/test/functional/rpc_listvaulthistory.py +++ b/test/functional/rpc_listvaulthistory.py @@ -17,7 +17,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=100', '-eunosheight=100', '-eunospayaheight=100', '-fortcanningheight=100', '-vaultindex=1']] - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py index aacfebb26c..d769117335 100755 --- a/test/functional/rpc_misc.py +++ b/test/functional/rpc_misc.py @@ -20,7 +20,6 @@ class RpcMiscTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/rpc_mn_basic.py b/test/functional/rpc_mn_basic.py index d0d2eeb0e3..6a13598e1f 100755 --- a/test/functional/rpc_mn_basic.py +++ b/test/functional/rpc_mn_basic.py @@ -25,7 +25,6 @@ def set_test_params(self): ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140'], ['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=50', '-dakotaheight=136', '-eunosheight=140', '-eunospayaheight=140']] - @DefiTestFramework.rollback def run_test(self): assert_equal(len(self.nodes[0].listmasternodes()), 8) self.nodes[0].generate(100) diff --git a/test/functional/rpc_named_arguments.py b/test/functional/rpc_named_arguments.py index 77cf9b5fe2..55b268636a 100755 --- a/test/functional/rpc_named_arguments.py +++ b/test/functional/rpc_named_arguments.py @@ -14,7 +14,6 @@ class NamedArgumentTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] h = node.help(command='getblockchaininfo') diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 772ee7e77f..741ba80244 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -28,7 +28,6 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-minrelaytxfee=0.00001000"],["-minrelaytxfee=0.00000500"]] - @DefiTestFramework.rollback def run_test(self): self._test_connection_count() self._test_getnettotals() diff --git a/test/functional/rpc_preciousblock.py b/test/functional/rpc_preciousblock.py index b148825c74..7f03f5ef49 100755 --- a/test/functional/rpc_preciousblock.py +++ b/test/functional/rpc_preciousblock.py @@ -40,7 +40,6 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() - @DefiTestFramework.rollback def run_test(self): self.log.info("Ensure submitblock can in principle reorg to a competing chain") # gen_address = lambda i: self.nodes[i].get_genesis_keys().address # A non-wallet address to mine to diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 6092ffd0e8..d1771d9c4a 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -75,7 +75,6 @@ def test_utxo_conversion(self): connect_nodes_bi(self.nodes, 0, 1) connect_nodes_bi(self.nodes, 0, 2) - @DefiTestFramework.rollback def run_test(self): # Create and fund a raw tx for sending 10 BTC psbtx1 = self.nodes[0].walletcreatefundedpsbt([], {self.nodes[2].getnewaddress():10})['psbt'] diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index 3551a9ca7c..e09326e6dd 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -51,7 +51,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info('prepare some coins for multiple *rawtransaction commands') self.nodes[2].generate(1) diff --git a/test/functional/rpc_scantxoutset.py b/test/functional/rpc_scantxoutset.py index 3a861295a1..380bce615d 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -21,7 +21,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(110) diff --git a/test/functional/rpc_setban.py b/test/functional/rpc_setban.py index bcc2b0c681..99c28d5569 100755 --- a/test/functional/rpc_setban.py +++ b/test/functional/rpc_setban.py @@ -16,7 +16,6 @@ def set_test_params(self): self.setup_clean_chain = True self.extra_args = [[],[]] - @DefiTestFramework.rollback def run_test(self): # Node 0 connects to Node 1, check that the noban permission is not granted connect_nodes(self.nodes[0], 1) diff --git a/test/functional/rpc_signmessage.py b/test/functional/rpc_signmessage.py index 0a4879fda2..cec64269f8 100755 --- a/test/functional/rpc_signmessage.py +++ b/test/functional/rpc_signmessage.py @@ -16,7 +16,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): message = 'This is just a test message' diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py index 33ca04f57d..ae551491c9 100755 --- a/test/functional/rpc_signrawtransaction.py +++ b/test/functional/rpc_signrawtransaction.py @@ -168,7 +168,6 @@ def witness_script_test(self): assert 'complete' in spending_tx_signed assert_equal(spending_tx_signed['complete'], True) - @DefiTestFramework.rollback def run_test(self): self.successful_signing_test() self.script_verification_error_test() diff --git a/test/functional/rpc_txoutproof.py b/test/functional/rpc_txoutproof.py index f0c5c9a998..6a97399113 100755 --- a/test/functional/rpc_txoutproof.py +++ b/test/functional/rpc_txoutproof.py @@ -18,7 +18,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(105) diff --git a/test/functional/rpc_updatemasternode.py b/test/functional/rpc_updatemasternode.py index 56a389f450..abfe0338d8 100755 --- a/test/functional/rpc_updatemasternode.py +++ b/test/functional/rpc_updatemasternode.py @@ -110,7 +110,6 @@ def transfer_owner(self, mn_id): assert_equal(result['collateralTx'], mn_transfer_tx) assert_equal(result['ownerAuthAddress'], new_owner) - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(105) self.sync_blocks() diff --git a/test/functional/rpc_uptime.py b/test/functional/rpc_uptime.py index 40fa791879..63a36b071f 100755 --- a/test/functional/rpc_uptime.py +++ b/test/functional/rpc_uptime.py @@ -17,7 +17,6 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - @DefiTestFramework.rollback def run_test(self): self._test_uptime() diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py index 2e81a3971e..2ee872dca4 100755 --- a/test/functional/rpc_users.py +++ b/test/functional/rpc_users.py @@ -83,7 +83,6 @@ def test_auth(self, node, user, password): self.log.info('Wrong...') assert_equal(401, call_with_auth(node, user+'wrong', password+'wrong').status) - @DefiTestFramework.rollback def run_test(self): ################################################## diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index f196a04e09..40135caffc 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -195,7 +195,6 @@ def test_getwalletinfo_on_different_wallet(self): assert_equal(shasum_after, shasum_before) self.log.debug('Wallet file shasum unchanged\n') - @DefiTestFramework.rollback def run_test(self): self.wallet_path = os.path.join(self.nodes[0].datadir, 'regtest', 'wallets', 'wallet.dat') self.test_invalid_tool_commands_and_args() diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py index 95baf97b23..ed2232f4c7 100755 --- a/test/functional/wallet_abandonconflict.py +++ b/test/functional/wallet_abandonconflict.py @@ -29,7 +29,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[1].generate(100) self.sync_blocks() diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py index 5b8f4ac863..d1c6dc5b44 100755 --- a/test/functional/wallet_address_types.py +++ b/test/functional/wallet_address_types.py @@ -218,7 +218,6 @@ def test_change_output_type(self, node_sender, destinations, expected_type): self.log.debug("Check if change address " + change_addresses[0] + " is " + expected_type) self.test_address(node_sender, change_addresses[0], multisig=False, typ=expected_type) - @DefiTestFramework.rollback def run_test(self): # Mine 101 blocks on node5 to bring nodes out of IBD and make sure that # no coinbases are maturing for the nodes-under-test during the test diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index 8d30d94d43..5961e2b558 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -78,7 +78,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): '''Set up initial chain and run tests defined below''' diff --git a/test/functional/wallet_backup.py b/test/functional/wallet_backup.py index d6b3a775f8..fe1671f8ae 100755 --- a/test/functional/wallet_backup.py +++ b/test/functional/wallet_backup.py @@ -108,7 +108,6 @@ def erase_three(self): os.remove(os.path.join(self.nodes[1].datadir, 'regtest', 'wallets', 'wallet.dat')) os.remove(os.path.join(self.nodes[2].datadir, 'regtest', 'wallets', 'wallet.dat')) - @DefiTestFramework.rollback def run_test(self): self.log.info("Generating initial blockchain") self.nodes[0].generate(1) diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py index 3aa8d9cffc..c1f3fb826b 100755 --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -58,7 +58,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].importaddress(ADDRESS_WATCHONLY) # Check that nodes don't own any UTXOs diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 7d378cdcc0..27d6dc9763 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -46,7 +46,6 @@ def check_fee_amount(self, curr_balance, balance_with_fee, fee_per_byte, tx_size def get_vsize(self, txn): return self.nodes[0].decoderawtransaction(txn)['vsize'] - @DefiTestFramework.rollback def run_test(self): # Check that there's no UTXO on none of the nodes assert_equal(len(self.nodes[0].listunspent()), 0) diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py index 7b93e69d98..532c2e25d7 100755 --- a/test/functional/wallet_bumpfee.py +++ b/test/functional/wallet_bumpfee.py @@ -44,7 +44,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Encrypt wallet for test_locked_wallet_fails test self.nodes[1].encryptwallet(WALLET_PASSPHRASE) diff --git a/test/functional/wallet_bumpfee_totalfee_deprecation.py b/test/functional/wallet_bumpfee_totalfee_deprecation.py index f8daefe484..350dbe94d2 100755 --- a/test/functional/wallet_bumpfee_totalfee_deprecation.py +++ b/test/functional/wallet_bumpfee_totalfee_deprecation.py @@ -20,7 +20,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): peer_node, rbf_node = self.nodes peer_node.generate(110) diff --git a/test/functional/wallet_coinbase_category.py b/test/functional/wallet_coinbase_category.py index e128437a12..590086a03a 100755 --- a/test/functional/wallet_coinbase_category.py +++ b/test/functional/wallet_coinbase_category.py @@ -30,7 +30,6 @@ def assert_category(self, category, address, txid, skip): {"address": address}, {"category": category}) - @DefiTestFramework.rollback def run_test(self): # Generate one block to an address address = self.nodes[0].getnewaddress() diff --git a/test/functional/wallet_create_tx.py b/test/functional/wallet_create_tx.py index c8b4c8cbbf..fdb2141873 100755 --- a/test/functional/wallet_create_tx.py +++ b/test/functional/wallet_create_tx.py @@ -21,7 +21,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info('Create some old blocks') self.nodes[0].setmocktime(TIME_GENESIS_BLOCK+1) diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py index beb374fbb0..5890679fe2 100755 --- a/test/functional/wallet_createwallet.py +++ b/test/functional/wallet_createwallet.py @@ -20,7 +20,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] node.generate(1) # Leave IBD for sethdseed diff --git a/test/functional/wallet_dump.py b/test/functional/wallet_dump.py index 1f00553486..b9ac67d787 100755 --- a/test/functional/wallet_dump.py +++ b/test/functional/wallet_dump.py @@ -98,7 +98,6 @@ def setup_network(self): self.add_nodes(self.num_nodes, extra_args=self.extra_args) self.start_nodes() - @DefiTestFramework.rollback def run_test(self): wallet_unenc_dump = os.path.join(self.nodes[0].datadir, "wallet.unencrypted.dump") wallet_enc_dump = os.path.join(self.nodes[0].datadir, "wallet.encrypted.dump") diff --git a/test/functional/wallet_encryption.py b/test/functional/wallet_encryption.py index aa63bc9788..1622310f64 100755 --- a/test/functional/wallet_encryption.py +++ b/test/functional/wallet_encryption.py @@ -22,7 +22,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): passphrase = "WalletPassphrase" passphrase2 = "SecondWalletPassphrase" diff --git a/test/functional/wallet_fallbackfee.py b/test/functional/wallet_fallbackfee.py index 28e29050f7..af14c57873 100755 --- a/test/functional/wallet_fallbackfee.py +++ b/test/functional/wallet_fallbackfee.py @@ -14,7 +14,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(101) diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py index 0ba0da8825..acd12b2098 100755 --- a/test/functional/wallet_groups.py +++ b/test/functional/wallet_groups.py @@ -26,7 +26,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Mine some coins self.nodes[0].generate(110) diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py index 10e622a742..3dd7b37245 100755 --- a/test/functional/wallet_hd.py +++ b/test/functional/wallet_hd.py @@ -24,7 +24,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Make sure we use hd, keep masterkeyid masterkeyid = self.nodes[1].getwalletinfo()['hdseedid'] diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py index 47b9965240..03ba7e5dbf 100755 --- a/test/functional/wallet_import_rescan.py +++ b/test/functional/wallet_import_rescan.py @@ -168,7 +168,6 @@ def setup_network(self): for i in range(1, self.num_nodes): connect_nodes(self.nodes[i], 0) - @DefiTestFramework.rollback def run_test(self): # Create one transaction on node 0 with a unique amount for # each possible type of wallet import RPC. diff --git a/test/functional/wallet_import_with_label.py b/test/functional/wallet_import_with_label.py index 90149059b9..d53128e7a6 100755 --- a/test/functional/wallet_import_with_label.py +++ b/test/functional/wallet_import_with_label.py @@ -22,7 +22,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): """Main test logic""" diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 86fa05a3b2..8554b40b8c 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -58,7 +58,6 @@ def test_importmulti(self, req, success, error_code=None, error_message=None, wa assert_equal(result[0]['error']['code'], error_code) assert_equal(result[0]['error']['message'], error_message) - @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(1) diff --git a/test/functional/wallet_importprunedfunds.py b/test/functional/wallet_importprunedfunds.py index 46ad27e1e3..04fa36e029 100755 --- a/test/functional/wallet_importprunedfunds.py +++ b/test/functional/wallet_importprunedfunds.py @@ -19,7 +19,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(101) diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index e50c573524..fbf149ac4c 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -16,7 +16,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): nodes = self.nodes addr_before_encrypting = nodes[0].getnewaddress() diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py index 5aff77936f..b23bfcf4f5 100755 --- a/test/functional/wallet_keypool_topup.py +++ b/test/functional/wallet_keypool_topup.py @@ -29,7 +29,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): wallet_path = os.path.join(self.nodes[1].datadir, "regtest", "wallets", "wallet.dat") wallet_backup_path = os.path.join(self.nodes[1].datadir, "wallet.bak") diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py index b809aec44a..bf19f9cbea 100755 --- a/test/functional/wallet_labels.py +++ b/test/functional/wallet_labels.py @@ -22,7 +22,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Check that there's no UTXO on the node node = self.nodes[0] diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py index 315dc2bd07..80c75df014 100755 --- a/test/functional/wallet_listreceivedby.py +++ b/test/functional/wallet_listreceivedby.py @@ -20,7 +20,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): # Generate block to get out of IBD self.nodes[0].generate(1) diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py index c0db40abb4..27adeaf695 100755 --- a/test/functional/wallet_listsinceblock.py +++ b/test/functional/wallet_listsinceblock.py @@ -15,7 +15,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[2].generate(101) self.sync_blocks() diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py index 77a3621921..fc64df21da 100755 --- a/test/functional/wallet_listtransactions.py +++ b/test/functional/wallet_listtransactions.py @@ -27,7 +27,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.nodes[0].generate(1) # Get out of IBD self.sync_blocks() diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py index 5eabafd5b5..4e27b956ff 100755 --- a/test/functional/wallet_multiwallet.py +++ b/test/functional/wallet_multiwallet.py @@ -27,7 +27,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py index f511b29d47..52c559242f 100755 --- a/test/functional/wallet_resendwallettransactions.py +++ b/test/functional/wallet_resendwallettransactions.py @@ -31,7 +31,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] # alias diff --git a/test/functional/wallet_txn_clone.py b/test/functional/wallet_txn_clone.py index 58d953a669..b5f94e2941 100755 --- a/test/functional/wallet_txn_clone.py +++ b/test/functional/wallet_txn_clone.py @@ -32,7 +32,6 @@ def setup_network(self): disconnect_nodes(self.nodes[1], 2) disconnect_nodes(self.nodes[2], 1) - @DefiTestFramework.rollback def run_test(self): if self.options.segwit: output_type = "p2sh-segwit" diff --git a/test/functional/wallet_txn_doublespend.py b/test/functional/wallet_txn_doublespend.py index ba2f6d4ff6..8426fdb45d 100755 --- a/test/functional/wallet_txn_doublespend.py +++ b/test/functional/wallet_txn_doublespend.py @@ -30,7 +30,6 @@ def setup_network(self): disconnect_nodes(self.nodes[1], 2) disconnect_nodes(self.nodes[2], 1) - @DefiTestFramework.rollback def run_test(self): # All nodes should start with 1,250 BTC: starting_balance = 1250 diff --git a/test/functional/wallet_watchonly.py b/test/functional/wallet_watchonly.py index 4370916839..edff751a46 100755 --- a/test/functional/wallet_watchonly.py +++ b/test/functional/wallet_watchonly.py @@ -21,7 +21,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): node = self.nodes[0] diff --git a/test/functional/wallet_zapwallettxes.py b/test/functional/wallet_zapwallettxes.py index 0a5168c433..6de50dc4da 100755 --- a/test/functional/wallet_zapwallettxes.py +++ b/test/functional/wallet_zapwallettxes.py @@ -30,7 +30,6 @@ def set_test_params(self): def skip_test_if_missing_module(self): self.skip_if_no_wallet() - @DefiTestFramework.rollback def run_test(self): self.log.info("Mining blocks...") self.nodes[0].generate(1) From 600f57fc509c80c45762afa35c06bcdc4a687ebe Mon Sep 17 00:00:00 2001 From: dcorral Date: Tue, 31 Jan 2023 12:52:05 +0100 Subject: [PATCH 06/14] Add rollback parameter detection in decorator --- .../test_framework/test_framework.py | 47 ++++-- test/functional/test_framework_rollback.py | 137 ++++++++++++++++++ test/functional/test_runner.py | 1 + 3 files changed, 172 insertions(+), 13 deletions(-) create mode 100755 test/functional/test_framework_rollback.py diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index b330a1cb3b..2ab4802017 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -15,6 +15,7 @@ import sys import tempfile import time +import inspect from .authproxy import JSONRPCException from . import coverage @@ -102,22 +103,42 @@ def __init__(self): assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()" + def _check_rollback(self, func, *args, **kwargs): + init_height = None + init_data = None + if len(self.nodes) != 0: + init_height = self.nodes[0].getblockcount() + init_data = self._get_chain_data() + result = func(self, *args, **kwargs) + if len(self.nodes) != 0: + self.rollback_to(init_height, nodes=list(range(len(self.nodes)))) + final_data = self._get_chain_data() + final_height = self.nodes[0].getblockcount() + assert(init_data == final_data) + assert(init_height == final_height) + return result + @classmethod def rollback(cls, func): def wrapper(self, *args, **kwargs): - init_height = None - init_data = None - if len(self.nodes) != 0: - init_height = self.nodes[0].getblockcount() - init_data = self._get_chain_data() - result = func(self, *args, **kwargs) - if len(self.nodes) != 0: - self.rollback_to(init_height) - final_data = self._get_chain_data() - final_height = self.nodes[0].getblockcount() - assert(init_data == final_data) - assert(init_height == final_height) - return result + signature = inspect.signature(func) + default_value = None + passed_value = None + if "rollback" in signature.parameters: + param = signature.parameters["rollback"] + if param.default is not param.empty: + default_value = param.default + if "rollback" in kwargs: + passed_value = kwargs["rollback"] + else: + passed_value = default_value + if isinstance(passed_value, bool): + if passed_value == True: + return self._check_rollback(func, *args, **kwargs) + return func(self, *args, **kwargs) + else: + self.log.warning("rollback parameter is not of type bool, rollback cancelled") + return func(self, *args, **kwargs) return wrapper def main(self): diff --git a/test/functional/test_framework_rollback.py b/test/functional/test_framework_rollback.py new file mode 100755 index 0000000000..cceb31deca --- /dev/null +++ b/test/functional/test_framework_rollback.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 +# Copyright (c) 2014-2019 The Bitcoin Core developers +# Copyright (c) DeFi Blockchain Developers +# Distributed under the MIT software license, see the accompanying +# file LICENSE or http://www.opensource.org/licenses/mit-license.php. +"""Test Loan - loan basics.""" + +from test_framework.test_framework import DefiTestFramework +from test_framework.util import assert_equal, assert_raises_rpc_error +from decimal import Decimal +import time + +class RollbackFrameworkTest (DefiTestFramework): + def set_test_params(self): + self.num_nodes = 4 + self.setup_clean_chain = True + self.extra_args = [ + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1'], + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1'], + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1'], + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-bayfrontgardensheight=1', '-fortcanningheight=50', '-eunosheight=50', '-fortcanninghillheight=50', '-fortcanningparkheight=50', '-fortcanningroadheight=50', '-fortcanningcrunchheight=50', '-fortcanningspringheight=50', '-fortcanninggreatworldheight=250', '-grandcentralheight=254', '-grandcentralepilogueheight=350', '-regtest-minttoken-simulate-mainnet=1', '-txindex=1']] + + + def init_chain(self): + print("Generating initial chain...") + self.nodes[0].generate(100) + self.sync_blocks() + + @DefiTestFramework.rollback + def set_accounts(self, rollback=True): + self.account0 = self.nodes[0].get_genesis_keys().ownerAuthAddress + self.account1 = self.nodes[1].getnewaddress("", "legacy") + self.account2 = self.nodes[2].get_genesis_keys().ownerAuthAddress + self.account3 = self.nodes[3].get_genesis_keys().ownerAuthAddress + self.nodes[1].generate(20) + self.sync_blocks() + + self.nodes[0].sendtoaddress(self.account1, 10) + self.nodes[0].sendtoaddress(self.account2, 10) + self.nodes[0].sendtoaddress(self.account3, 10) + self.nodes[0].generate(1) + self.sync_blocks() + + @DefiTestFramework.rollback + def create_tokens(self, rollback=None): + self.symbolBTC = "BTC" + self.symbolDOGE = "DOGE" + + self.nodes[0].createtoken({ + "symbol": self.symbolBTC, + "name": "BTC token", + "isDAT": True, + "collateralAddress": self.account0 + }) + + self.nodes[0].generate(1) + self.sync_blocks() + + self.nodes[0].minttokens(["2@" + self.symbolBTC]) + + self.nodes[0].createtoken({ + "symbol": self.symbolDOGE, + "name": "DOGE token", + "isDAT": True, + "collateralAddress": self.account3 + }) + + self.nodes[0].generate(1) + self.sync_blocks() + + self.idBTC = list(self.nodes[0].gettoken(self.symbolBTC).keys())[0] + self.idDOGE = list(self.nodes[0].gettoken(self.symbolDOGE).keys())[0] + + assert_raises_rpc_error(-32600, "called before GrandCentral height", self.nodes[0].burntokens, { + 'amounts': "1@" + self.symbolBTC, + 'from': self.account0, + }) + + self.nodes[0].generate(254 - self.nodes[0].getblockcount()) + self.sync_blocks() + + # DAT owner can mint + self.nodes[3].minttokens(["1@" + self.symbolDOGE]) + self.nodes[3].generate(1) + self.sync_blocks() + + @DefiTestFramework.rollback + def mint_extra(self, rollback=None): + self.nodes[3].minttokens(["1@" + self.symbolDOGE]) + self.nodes[3].generate(1) + self.sync_blocks() + + def run_test(self): + + self.init_chain() + height = self.nodes[0].getblockcount() # block 100 + + # rollback + self.set_accounts() + height1 = self.nodes[1].getblockcount() + assert_equal(height, height1) + + # rollback + self.set_accounts(rollback=True) + height2 = self.nodes[2].getblockcount() + assert_equal(height, height2) + + # No rollback + self.set_accounts(rollback=False) + height3 = self.nodes[3].getblockcount() + assert(height != height3) + + # Print warning + No rollback + # Default rollback = None -> not boolean + self.create_tokens() + height4 = self.nodes[0].getblockcount() + assert(height4 != height3) + + # Print warning + No rollback + # rollback = "wrongType" -> not boolean + self.mint_extra(rollback="wrongType") + height5 = self.nodes[0].getblockcount() + assert(height5 != height4) + + # rollback + self.mint_extra(rollback=True) + height6 = self.nodes[0].getblockcount() + assert_equal(height6, height5) + + # No rollback + self.mint_extra(rollback=False) + height7 = self.nodes[0].getblockcount() + assert(height6 != height7) + + +if __name__ == '__main__': + RollbackFrameworkTest().main() diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index af1fdbfaaf..26a0e006f1 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -318,6 +318,7 @@ 'feature_update_mn.py', 'feature_block_reward.py', 'feature_negative_interest.py', + 'test_framework_rollback', 'rpc_getstoredinterest.py', 'feature_dusd_loans.py', # Don't append tests at the end to avoid merge conflicts From 6dd1d00d7816628e6f33f04ee7d921253dd11bac Mon Sep 17 00:00:00 2001 From: dcorral Date: Tue, 31 Jan 2023 17:16:09 +0100 Subject: [PATCH 07/14] Fix lint error and test_runner nomeclature --- ...ramework_rollback.py => feature_framework_rollback.py} | 8 +++----- test/functional/test_runner.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) rename test/functional/{test_framework_rollback.py => feature_framework_rollback.py} (97%) diff --git a/test/functional/test_framework_rollback.py b/test/functional/feature_framework_rollback.py similarity index 97% rename from test/functional/test_framework_rollback.py rename to test/functional/feature_framework_rollback.py index cceb31deca..bc4fef8524 100755 --- a/test/functional/test_framework_rollback.py +++ b/test/functional/feature_framework_rollback.py @@ -7,8 +7,6 @@ from test_framework.test_framework import DefiTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error -from decimal import Decimal -import time class RollbackFrameworkTest (DefiTestFramework): def set_test_params(self): @@ -123,12 +121,12 @@ def run_test(self): assert(height5 != height4) # rollback - self.mint_extra(rollback=True) + self.mint_extra(rollback=True) height6 = self.nodes[0].getblockcount() assert_equal(height6, height5) - + # No rollback - self.mint_extra(rollback=False) + self.mint_extra(rollback=False) height7 = self.nodes[0].getblockcount() assert(height6 != height7) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 26a0e006f1..e0814e2e0c 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -318,7 +318,7 @@ 'feature_update_mn.py', 'feature_block_reward.py', 'feature_negative_interest.py', - 'test_framework_rollback', + 'feature_framework_rollback', 'rpc_getstoredinterest.py', 'feature_dusd_loans.py', # Don't append tests at the end to avoid merge conflicts From 2615ca8ef0fbe39991df361f5fefc7d31f2cba30 Mon Sep 17 00:00:00 2001 From: dCorral <55594560+dcorral@users.noreply.github.com> Date: Tue, 31 Jan 2023 20:39:25 +0100 Subject: [PATCH 08/14] Update test_runner.py --- test/functional/test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index e0814e2e0c..f7cc843775 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -318,7 +318,7 @@ 'feature_update_mn.py', 'feature_block_reward.py', 'feature_negative_interest.py', - 'feature_framework_rollback', + 'feature_framework_rollback.py', 'rpc_getstoredinterest.py', 'feature_dusd_loans.py', # Don't append tests at the end to avoid merge conflicts From 1ae079a697bec0c2dcfac7ae6b5d8ddf133186be Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 2 Mar 2023 16:12:29 +0800 Subject: [PATCH 09/14] Fix lint --- test/functional/test_framework/test_framework.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 8b7828a845..d952a808b0 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1,5 +1,4 @@ -#! -/usr/bin/env python3 +#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. From 0e91e900477d7bd661e54eeb80e38ccef66234ff Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 2 Mar 2023 17:33:10 +0800 Subject: [PATCH 10/14] Fix rollback_to call --- test/functional/test_framework/test_framework.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index d952a808b0..70526c51ce 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -114,7 +114,7 @@ def _check_rollback(self, func, *args, **kwargs): init_data = self._get_chain_data() result = func(self, *args, **kwargs) if len(self.nodes) != 0: - self.rollback_to(init_height, nodes=list(range(len(self.nodes)))) + self.rollback_to(init_height) final_data = self._get_chain_data() final_height = self.nodes[0].getblockcount() assert(init_data == final_data) @@ -491,7 +491,9 @@ def _get_chain_data(self): self.nodes[0].getburninfo(), self.nodes[0].getloaninfo(), self.nodes[0].listanchors(), - self.nodes[0].listgovproposals() + self.nodes[0].listgovproposals(), + self.nodes[0].listburnhistory(), + self.nodes[0].listcommunitybalances() ] def run_test(self): From 9f364271b6d370f19726877f7a5325064c01bebd Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 2 Mar 2023 18:19:10 +0800 Subject: [PATCH 11/14] Remove function rollback parameter Rename decorator and fix tests --- test/functional/feature_framework_rollback.py | 58 ++++++++++--------- .../test_framework/test_framework.py | 39 +++---------- 2 files changed, 39 insertions(+), 58 deletions(-) diff --git a/test/functional/feature_framework_rollback.py b/test/functional/feature_framework_rollback.py index bc4fef8524..a5c83a1f3a 100755 --- a/test/functional/feature_framework_rollback.py +++ b/test/functional/feature_framework_rollback.py @@ -24,7 +24,6 @@ def init_chain(self): self.nodes[0].generate(100) self.sync_blocks() - @DefiTestFramework.rollback def set_accounts(self, rollback=True): self.account0 = self.nodes[0].get_genesis_keys().ownerAuthAddress self.account1 = self.nodes[1].getnewaddress("", "legacy") @@ -39,7 +38,11 @@ def set_accounts(self, rollback=True): self.nodes[0].generate(1) self.sync_blocks() - @DefiTestFramework.rollback + @DefiTestFramework.rollback_diff_chain_data + def set_accounts_with_rollback(self): + self.set_accounts() + + def create_tokens(self, rollback=None): self.symbolBTC = "BTC" self.symbolDOGE = "DOGE" @@ -82,54 +85,53 @@ def create_tokens(self, rollback=None): self.nodes[3].generate(1) self.sync_blocks() - @DefiTestFramework.rollback + @DefiTestFramework.rollback_diff_chain_data + def create_tokens_with_rollback(self): + self.create_tokens() + def mint_extra(self, rollback=None): self.nodes[3].minttokens(["1@" + self.symbolDOGE]) self.nodes[3].generate(1) self.sync_blocks() + @DefiTestFramework.rollback_diff_chain_data + def mint_extra_with_rollback(self): + self.mint_extra() + def run_test(self): self.init_chain() height = self.nodes[0].getblockcount() # block 100 # rollback - self.set_accounts() + self.set_accounts_with_rollback() height1 = self.nodes[1].getblockcount() assert_equal(height, height1) - # rollback - self.set_accounts(rollback=True) - height2 = self.nodes[2].getblockcount() - assert_equal(height, height2) - - # No rollback + # no rollback self.set_accounts(rollback=False) - height3 = self.nodes[3].getblockcount() - assert(height != height3) + height2 = self.nodes[3].getblockcount() + assert(height != height2) + + # rollback + self.create_tokens_with_rollback() + height3 = self.nodes[0].getblockcount() + assert_equal(height2, height3) - # Print warning + No rollback - # Default rollback = None -> not boolean + # no rollback self.create_tokens() height4 = self.nodes[0].getblockcount() - assert(height4 != height3) + assert(height3 != height4) - # Print warning + No rollback - # rollback = "wrongType" -> not boolean - self.mint_extra(rollback="wrongType") + # rollback + self.mint_extra_with_rollback() height5 = self.nodes[0].getblockcount() - assert(height5 != height4) + assert_equal(height5, height4) - # rollback - self.mint_extra(rollback=True) + # no rollback + self.mint_extra() height6 = self.nodes[0].getblockcount() - assert_equal(height6, height5) - - # No rollback - self.mint_extra(rollback=False) - height7 = self.nodes[0].getblockcount() - assert(height6 != height7) - + assert(height6 != height5) if __name__ == '__main__': RollbackFrameworkTest().main() diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 70526c51ce..dd5d839ddf 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -107,41 +107,20 @@ def __init__(self): assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()" def _check_rollback(self, func, *args, **kwargs): - init_height = None - init_data = None - if len(self.nodes) != 0: - init_height = self.nodes[0].getblockcount() - init_data = self._get_chain_data() + init_height = self.nodes[0].getblockcount() + init_data = self._get_chain_data() result = func(self, *args, **kwargs) - if len(self.nodes) != 0: - self.rollback_to(init_height) - final_data = self._get_chain_data() - final_height = self.nodes[0].getblockcount() - assert(init_data == final_data) - assert(init_height == final_height) + self.rollback_to(init_height) + final_data = self._get_chain_data() + final_height = self.nodes[0].getblockcount() + assert(init_data == final_data) + assert(init_height == final_height) return result @classmethod - def rollback(cls, func): + def rollback_diff_chain_data(cls, func): def wrapper(self, *args, **kwargs): - signature = inspect.signature(func) - default_value = None - passed_value = None - if "rollback" in signature.parameters: - param = signature.parameters["rollback"] - if param.default is not param.empty: - default_value = param.default - if "rollback" in kwargs: - passed_value = kwargs["rollback"] - else: - passed_value = default_value - if isinstance(passed_value, bool): - if passed_value == True: - return self._check_rollback(func, *args, **kwargs) - return func(self, *args, **kwargs) - else: - self.log.warning("rollback parameter is not of type bool, rollback cancelled") - return func(self, *args, **kwargs) + return self._check_rollback(func, *args, **kwargs) return wrapper def main(self): From e28bdc62f18466d0b1526ec42965f4579ea8e1f1 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 3 Mar 2023 08:18:20 +0800 Subject: [PATCH 12/14] Rename decorator --- test/functional/feature_framework_rollback.py | 6 +++--- test/functional/test_framework/test_framework.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/feature_framework_rollback.py b/test/functional/feature_framework_rollback.py index a5c83a1f3a..40b26c6543 100755 --- a/test/functional/feature_framework_rollback.py +++ b/test/functional/feature_framework_rollback.py @@ -38,7 +38,7 @@ def set_accounts(self, rollback=True): self.nodes[0].generate(1) self.sync_blocks() - @DefiTestFramework.rollback_diff_chain_data + @DefiTestFramework.capture_rollback_verify def set_accounts_with_rollback(self): self.set_accounts() @@ -85,7 +85,7 @@ def create_tokens(self, rollback=None): self.nodes[3].generate(1) self.sync_blocks() - @DefiTestFramework.rollback_diff_chain_data + @DefiTestFramework.capture_rollback_verify def create_tokens_with_rollback(self): self.create_tokens() @@ -94,7 +94,7 @@ def mint_extra(self, rollback=None): self.nodes[3].generate(1) self.sync_blocks() - @DefiTestFramework.rollback_diff_chain_data + @DefiTestFramework.capture_rollback_verify def mint_extra_with_rollback(self): self.mint_extra() diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index dd5d839ddf..72929ad8cb 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -118,7 +118,7 @@ def _check_rollback(self, func, *args, **kwargs): return result @classmethod - def rollback_diff_chain_data(cls, func): + def capture_rollback_verify(cls, func): def wrapper(self, *args, **kwargs): return self._check_rollback(func, *args, **kwargs) return wrapper From 01ba9c4e8b4e5e248b845f4969c763427c465b51 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 3 Mar 2023 10:58:00 +0800 Subject: [PATCH 13/14] Add decorator warning and comments --- test/functional/test_framework/test_framework.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 72929ad8cb..caa9139c8a 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -106,6 +106,7 @@ def __init__(self): assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()" + # Captures the chain data, does a rollback and checks data has been restored def _check_rollback(self, func, *args, **kwargs): init_height = self.nodes[0].getblockcount() init_data = self._get_chain_data() @@ -117,6 +118,7 @@ def _check_rollback(self, func, *args, **kwargs): assert(init_height == final_height) return result + # WARNING: This decorator uses _get_chain_data() internally which can be an expensive call if used in large test scenarios. @classmethod def capture_rollback_verify(cls, func): def wrapper(self, *args, **kwargs): @@ -458,6 +460,7 @@ def rollback_to(self, block, nodes=None): for x in connections[node]: connect_nodes(node, x) + # build the data obj to be checked pre and post rollback def _get_chain_data(self): return [ self.nodes[0].logaccountbalances(), From 7408084c2107a18f0eedcbf3239352e72bfb21f5 Mon Sep 17 00:00:00 2001 From: dcorral Date: Fri, 3 Mar 2023 13:30:36 +0800 Subject: [PATCH 14/14] Fix lint error --- test/functional/test_framework/test_framework.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index caa9139c8a..a4dc40f5dc 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -15,7 +15,6 @@ import sys import tempfile import time -import inspect import re from typing import List