Skip to content

test: wallet reindex test has a race #7745

@laanwj

Description

@laanwj

It doesn't actually wait for the reindex to complete - so sometimes one gets this error, where there's no balance yet:

check -reindex
Assertion failed: [Decimal('33.99911100'), Decimal('5649.99796160'), Decimal('59.99974800')] != [Decimal('33.99911100'), Decimal('5649.99796160'), Decimal('0E-8')]
  File "/data/src/bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 135, in main
    self.run_test()
  File "./wallet.py", line 296, in run_test
    assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
  File "/data/src/bitcoin/qa/rpc-tests/test_framework/util.py", line 428, in assert_equal
    raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
Stopping nodes
Cleaning up
Failed

The error is kind of rare as reindexing of the regtest chain is very fast.
It does seem to happen more after #7744, as it has less delay in the startup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions