mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 10:02:40 +02:00
[wallet] don't create long chains by default
This commit is contained in:
@@ -25,7 +25,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 4
|
||||
self.extra_args = [[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-acceptnonstdtxn=1", "-walletrejectlongchains=0"
|
||||
]] * self.num_nodes
|
||||
self.setup_clean_chain = True
|
||||
self.supports_cli = False
|
||||
@@ -142,7 +142,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
self.nodes[2].lockunspent(False, [unspent_0], True)
|
||||
|
||||
# Restarting the node with the lock written to the wallet should keep the lock
|
||||
self.restart_node(2)
|
||||
self.restart_node(2, ["-walletrejectlongchains=0"])
|
||||
assert_raises_rpc_error(-8, "Invalid parameter, output already locked", self.nodes[2].lockunspent, False, [unspent_0])
|
||||
|
||||
# Unloading and reloading the wallet with a persistent lock should keep the lock
|
||||
@@ -568,7 +568,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
self.log.info("Test -reindex")
|
||||
self.stop_nodes()
|
||||
# set lower ancestor limit for later
|
||||
self.start_node(0, ['-reindex', "-limitancestorcount=" + str(chainlimit)])
|
||||
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)])
|
||||
# reindex will leave rpc warm up "early"; Wait for it to finish
|
||||
|
Reference in New Issue
Block a user