mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-23 07:13:33 +02:00
test: Bump timeout in wallet_import_rescan
This commit is contained in:
parent
c54295c1a2
commit
fabfcad876
@ -241,7 +241,7 @@ class TestNode():
|
|||||||
if "No RPC credentials" not in str(e):
|
if "No RPC credentials" not in str(e):
|
||||||
raise
|
raise
|
||||||
time.sleep(1.0 / poll_per_s)
|
time.sleep(1.0 / poll_per_s)
|
||||||
self._raise_assertion_error("Unable to connect to bitcoind")
|
self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout))
|
||||||
|
|
||||||
def generate(self, nblocks, maxtries=1000000):
|
def generate(self, nblocks, maxtries=1000000):
|
||||||
self.log.debug("TestNode.generate() dispatches `generate` call to `generatetoaddress`")
|
self.log.debug("TestNode.generate() dispatches `generate` call to `generatetoaddress`")
|
||||||
@ -527,7 +527,6 @@ def arg_to_cli(arg):
|
|||||||
|
|
||||||
class TestNodeCLI():
|
class TestNodeCLI():
|
||||||
"""Interface to bitcoin-cli for an individual node"""
|
"""Interface to bitcoin-cli for an individual node"""
|
||||||
|
|
||||||
def __init__(self, binary, datadir):
|
def __init__(self, binary, datadir):
|
||||||
self.options = []
|
self.options = []
|
||||||
self.binary = binary
|
self.binary = binary
|
||||||
|
@ -40,7 +40,6 @@ Rescan = enum.Enum("Rescan", "no yes late_timestamp")
|
|||||||
|
|
||||||
class Variant(collections.namedtuple("Variant", "call data address_type rescan prune")):
|
class Variant(collections.namedtuple("Variant", "call data address_type rescan prune")):
|
||||||
"""Helper for importing one key and verifying scanned transactions."""
|
"""Helper for importing one key and verifying scanned transactions."""
|
||||||
|
|
||||||
def do_import(self, timestamp):
|
def do_import(self, timestamp):
|
||||||
"""Call one key import RPC."""
|
"""Call one key import RPC."""
|
||||||
rescan = self.rescan == Rescan.yes
|
rescan = self.rescan == Rescan.yes
|
||||||
@ -146,6 +145,7 @@ class ImportRescanTest(BitcoinTestFramework):
|
|||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 2 + len(IMPORT_NODES)
|
self.num_nodes = 2 + len(IMPORT_NODES)
|
||||||
self.supports_cli = False
|
self.supports_cli = False
|
||||||
|
self.rpc_timeout = 120
|
||||||
|
|
||||||
def skip_test_if_missing_module(self):
|
def skip_test_if_missing_module(self):
|
||||||
self.skip_if_no_wallet()
|
self.skip_if_no_wallet()
|
||||||
@ -226,5 +226,6 @@ class ImportRescanTest(BitcoinTestFramework):
|
|||||||
variant.expected_txs += 1
|
variant.expected_txs += 1
|
||||||
variant.check(variant.sent_txid, variant.sent_amount, variant.confirmation_height)
|
variant.check(variant.sent_txid, variant.sent_amount, variant.confirmation_height)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ImportRescanTest().main()
|
ImportRescanTest().main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user