From e8f1a34136efb23204975dcb5ef93fcf3e9e382f Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:58:17 +0100 Subject: [PATCH 1/2] Update rpc_createmultisig.py --- test/functional/rpc_createmultisig.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py index 7b8d2f552c..7c8b60936c 100755 --- a/test/functional/rpc_createmultisig.py +++ b/test/functional/rpc_createmultisig.py @@ -10,7 +10,6 @@ import os from test_framework.blocktools import ( - COINBASE_MATURITY, COINBASE_MATURITY_2, ) from test_framework.authproxy import JSONRPCException @@ -128,7 +127,7 @@ def checkbalances(self): height = node0.getblockchaininfo()["blocks"] assert 150 < height < 350 - total = (height - COINBASE_MATURITY) * 72000 + total = (height - COINBASE_MATURITY_2) * 72000 assert bal1 == 0 assert bal2 == self.moved assert bal0 + bal1 + bal2 == total @@ -228,4 +227,4 @@ def do_multisig(self): if __name__ == '__main__': - RpcCreateMultiSigTest().main() \ No newline at end of file + RpcCreateMultiSigTest().main() From f79ce559a0213589541c02f8e2ecc19a3f0b07d1 Mon Sep 17 00:00:00 2001 From: Jan <125610144+Jongjan88@users.noreply.github.com> Date: Mon, 11 Mar 2024 23:54:24 +0100 Subject: [PATCH 2/2] Update wallet_coinbase_category.py --- test/functional/wallet_coinbase_category.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/functional/wallet_coinbase_category.py b/test/functional/wallet_coinbase_category.py index 251c78aee1..9a8f59cf43 100755 --- a/test/functional/wallet_coinbase_category.py +++ b/test/functional/wallet_coinbase_category.py @@ -7,7 +7,7 @@ Tests listtransactions, listsinceblock, and gettransaction. """ -from test_framework.blocktools import COINBASE_MATURITY +from test_framework.blocktools import COINBASE_MATURITY_2 from test_framework.test_framework import DigiByteTestFramework from test_framework.util import ( assert_array_result @@ -37,24 +37,25 @@ def run_test(self): self.generatetoaddress(self.nodes[0], 1, address) hash = self.nodes[0].getbestblockhash() txid = self.nodes[0].getblock(hash)["tx"][0] + # Coinbase transaction is immature after 1 confirmation self.assert_category("immature", address, txid, 0) - # Mine another 8-1 blocks on top - self.generate(self.nodes[0], COINBASE_MATURITY - 1) - # Coinbase transaction is still immature after 7 confirmations - self.assert_category("immature", address, txid, 7) + # Mine another 99 blocks on top + self.generate(self.nodes[0], COINBASE_MATURITY_2 - 1) + # Coinbase transaction is still immature after 100 confirmations + self.assert_category("immature", address, txid, 99) # Mine one more block self.generate(self.nodes[0], 1) # Coinbase transaction is now matured, so category is "generate" - self.assert_category("generate", address, txid, 8) + self.assert_category("generate", address, txid, 100) # Orphan block that paid to address self.nodes[0].invalidateblock(hash) # Coinbase transaction is now orphaned - self.assert_category("orphan", address, txid, 8) + self.assert_category("orphan", address, txid, 100) if __name__ == '__main__': CoinbaseCategoryTest().main()