mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-14 16:50:17 +02:00
Stop enforcing ancestor size/count limits
The cluster limits should be sufficient. Co-Authored-By: Gregory Sanders <gsanders87@gmail.com>
This commit is contained in:
@@ -467,9 +467,9 @@ class WalletTest(BitcoinTestFramework):
|
||||
self.log.info("Test -reindex")
|
||||
self.stop_nodes()
|
||||
# set lower ancestor limit for later
|
||||
self.start_node(0, ['-reindex', "-walletrejectlongchains=0", "-limitancestorcount=" + str(chainlimit)])
|
||||
self.start_node(1, ['-reindex', "-limitancestorcount=" + str(chainlimit)])
|
||||
self.start_node(2, ['-reindex', "-limitancestorcount=" + str(chainlimit)])
|
||||
self.start_node(0, ['-reindex', "-walletrejectlongchains=0", "-limitancestorcount=" + str(chainlimit), "-limitclustercount=" + str(chainlimit)])
|
||||
self.start_node(1, ['-reindex', "-limitclustercount=" + str(chainlimit)])
|
||||
self.start_node(2, ['-reindex', "-limitclustercount=" + str(chainlimit)])
|
||||
# reindex will leave rpc warm up "early"; Wait for it to finish
|
||||
self.wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
||||
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
|
||||
@@ -510,7 +510,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
# Try with walletrejectlongchains
|
||||
# Double chain limit but require combining inputs, so we pass AttemptSelection
|
||||
self.stop_node(0)
|
||||
extra_args = ["-walletrejectlongchains", "-limitancestorcount=" + str(2 * chainlimit)]
|
||||
extra_args = ["-walletrejectlongchains", "-limitclustercount=" + str(2 * chainlimit), "-limitancestorcount=" + str(2*chainlimit)]
|
||||
self.start_node(0, extra_args=extra_args)
|
||||
|
||||
# wait until the wallet has submitted all transactions to the mempool
|
||||
@@ -521,7 +521,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
|
||||
node0_balance = self.nodes[0].getbalance()
|
||||
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
||||
assert_raises_rpc_error(-6, f"too many unconfirmed ancestors [limit: {chainlimit * 2}]", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))
|
||||
assert_raises_rpc_error(-6, "too many unconfirmed transactions in cluster", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))
|
||||
|
||||
# Verify nothing new in wallet
|
||||
assert_equal(total_txs, len(self.nodes[0].listtransactions("*", 99999)))
|
||||
|
||||
Reference in New Issue
Block a user