mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 15:29:14 +01:00
qa: Premine to deterministic address with -disablewallet
This commit is contained in:
@@ -18,6 +18,11 @@ class ReceivedByTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
|
||||
def import_deterministic_coinbase_privkeys(self):
|
||||
assert_equal(0, len(self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True)))
|
||||
super().import_deterministic_coinbase_privkeys()
|
||||
self.num_cb_reward_addresses = len(self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True))
|
||||
|
||||
def run_test(self):
|
||||
# Generate block to get out of IBD
|
||||
self.nodes[0].generate(1)
|
||||
@@ -64,7 +69,7 @@ class ReceivedByTest(BitcoinTestFramework):
|
||||
assert_raises_rpc_error(-4, "address_filter parameter was invalid", self.nodes[1].listreceivedbyaddress, minconf=0, include_empty=True, include_watchonly=True, address_filter="bamboozling")
|
||||
# Another address receive money
|
||||
res = self.nodes[1].listreceivedbyaddress(0, True, True)
|
||||
assert_equal(len(res), 2) # Right now 2 entries
|
||||
assert_equal(len(res), 2 + self.num_cb_reward_addresses) # Right now 2 entries
|
||||
other_addr = self.nodes[1].getnewaddress()
|
||||
txid2 = self.nodes[0].sendtoaddress(other_addr, 0.1)
|
||||
self.nodes[0].generate(1)
|
||||
@@ -81,7 +86,7 @@ class ReceivedByTest(BitcoinTestFramework):
|
||||
assert_equal(len(res), 1)
|
||||
# Should be two entries though without filter
|
||||
res = self.nodes[1].listreceivedbyaddress(0, True, True)
|
||||
assert_equal(len(res), 3) # Became 3 entries
|
||||
assert_equal(len(res), 3 + self.num_cb_reward_addresses) # Became 3 entries
|
||||
|
||||
# Not on random addr
|
||||
other_addr = self.nodes[0].getnewaddress() # note on node[0]! just a random addr
|
||||
|
||||
Reference in New Issue
Block a user