Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_deprecated.py
Show All 36 Lines | def set_test_params(self): | ||||
"-avacooldown=0", | "-avacooldown=0", | ||||
"-avaminquorumstake=0", | "-avaminquorumstake=0", | ||||
"-avaminavaproofsnodecount=0", | "-avaminavaproofsnodecount=0", | ||||
"-avaminquorumconnectedstakeratio=0", | "-avaminquorumconnectedstakeratio=0", | ||||
"-deprecatedrpc=isfinalblock_noerror", | "-deprecatedrpc=isfinalblock_noerror", | ||||
"-deprecatedrpc=isfinaltransaction_noerror", | "-deprecatedrpc=isfinaltransaction_noerror", | ||||
"-deprecatedrpc=getblocktemplate_sigops", | "-deprecatedrpc=getblocktemplate_sigops", | ||||
"-deprecatedrpc=softforks", | "-deprecatedrpc=softforks", | ||||
# This test checks for the presence of the ancestor count in | |||||
# the listunspent output. However this is only displayed if the | |||||
# count is non-null, which will no longer be the case after | |||||
# wellington activation. | |||||
f"-wellingtonactivationtime={FAR_IN_THE_FUTURE}", | |||||
"-deprecatedrpc=mempool_ancestors_descendants", | |||||
], | ], | ||||
] | ] | ||||
def skip_test_if_missing_module(self): | def skip_test_if_missing_module(self): | ||||
self.skip_if_no_wallet() | self.skip_if_no_wallet() | ||||
def run_test(self): | def run_test(self): | ||||
# This test should be used to verify correct behaviour of deprecated | # This test should be used to verify correct behaviour of deprecated | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
"Check the getblockchaininfo output with and without" | "Check the getblockchaininfo output with and without" | ||||
" -deprecatedrpc=softforks" | " -deprecatedrpc=softforks" | ||||
) | ) | ||||
assert "softforks" not in self.nodes[0].getblockchaininfo() | assert "softforks" not in self.nodes[0].getblockchaininfo() | ||||
res = self.nodes[1].getblockchaininfo() | res = self.nodes[1].getblockchaininfo() | ||||
assert_equal(res["softforks"], {}) | assert_equal(res["softforks"], {}) | ||||
txid = self.nodes[0].sendtoaddress( | |||||
self.nodes[0].get_deterministic_priv_key().address, 1000000 | |||||
) | |||||
assert txid in self.nodes[0].getrawmempool() | |||||
utxo = self.nodes[0].listunspent(minconf=0, maxconf=0)[0] | |||||
assert "ancestorcount" not in utxo | |||||
assert "ancestorsize" not in utxo | |||||
assert "ancestorfees" not in utxo | |||||
txid = self.nodes[1].sendtoaddress( | |||||
self.nodes[1].get_deterministic_priv_key().address, 1000000 | |||||
) | |||||
assert txid in self.nodes[1].getrawmempool() | |||||
utxo = self.nodes[1].listunspent(minconf=0, maxconf=0)[0] | |||||
assert "ancestorcount" in utxo | |||||
assert "ancestorsize" in utxo | |||||
assert "ancestorfees" in utxo | |||||
if __name__ == "__main__": | if __name__ == "__main__": | ||||
DeprecatedRpcTest().main() | DeprecatedRpcTest().main() |