Skip to content

Commit 8343420

Browse files
committed
Merge bitcoin/bitcoin#25915: test: Fix wallet_balance intermittent issue
fae5bd9 test: Fix wallet_balance intermittent issue (MacroFake) Pull request description: Diff to reproduce: ```diff index d2ed97c..25cc2d5734 100755 --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -265,7 +265,7 @@ class WalletTest(BitcoinTestFramework): self.nodes[0].invalidateblock(block_reorg) self.nodes[1].invalidateblock(block_reorg) assert_equal(self.nodes[0].getbalance(minconf=0), 0) # wallet txs not in the mempool are untrusted - self.generatetoaddress(self.nodes[0], 1, ADDRESS_WATCHONLY, sync_fun=self.no_op) + self.generatetoaddress(self.nodes[0], 1, ADDRESS_WATCHONLY) assert_equal(self.nodes[0].getbalance(minconf=0), 0) # wallet txs not in the mempool are untrusted # Now confirm tx_orig ``` Example in CI: ``` test 2022-08-24T10:09:22.486000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 133, in main self.run_test() File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/wallet_balance.py", line 269, in run_test assert_equal(self.nodes[0].getbalance(minconf=0), 0) # wallet txs not in the mempool are untrusted File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/util.py", line 56, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(98.85983340 == 0) ``` https://cirrus-ci.com/task/4981266251513856?logs=ci#L3269 ACKs for top commit: achow101: ACK fae5bd9 w0xlt: ACK bitcoin/bitcoin@fae5bd9 Tree-SHA512: 470f366720615c4a9326ec4c581fff569ecce9877f9134bb1975ec3d6f1d13a6403051418a91a80b2a86de617f43e539ec11bbf4f1713d0354d5b0ab98d22437
2 parents b936123 + fae5bd9 commit 8343420

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

test/functional/wallet_balance.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ def test_balances(*, fee_node_1=0):
266266
self.nodes[1].invalidateblock(block_reorg)
267267
assert_equal(self.nodes[0].getbalance(minconf=0), 0) # wallet txs not in the mempool are untrusted
268268
self.generatetoaddress(self.nodes[0], 1, ADDRESS_WATCHONLY, sync_fun=self.no_op)
269-
assert_equal(self.nodes[0].getbalance(minconf=0), 0) # wallet txs not in the mempool are untrusted
270269

271270
# Now confirm tx_orig
272271
self.restart_node(1, ['-persistmempool=0'])

0 commit comments

Comments
 (0)