Page MenuHomePhabricator

orphanage: Extract EraseOrphansForBlock
ClosedPublic

Authored by PiRK on May 18 2022, 14:23.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCec313f0eff80: orphanage: Extract EraseOrphansForBlock
Summary

Extract code that erases orphans when a new block is found into
EraseOrphansForBlock.

This is a backport of core#21148 [10/14]
https://github.com/bitcoin/bitcoin/pull/21148/commits/03257b832debcb1470420d8657d30ba30f4be770

Depends on D11487

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.May 18 2022, 14:23
This revision is now accepted and ready to land.May 18 2022, 15:04

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py ======

------- Stdout: -------
2022-05-19T08:27:29.379000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_16
2022-05-19T08:27:32.192000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21024 due to [Errno 104] Connection reset by peer
2022-05-19T08:27:36.472000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21024 due to [Errno 104] Connection reset by peer
2022-05-19T08:27:36.473000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21024 due to [Errno 104] Connection reset by peer
2022-05-19T08:27:39.871000Z TestFramework (INFO): Check we send a getavaaddr message to our avalanche outbound peers
2022-05-19T08:27:42.378000Z TestFramework (INFO): Check we send a getavaaddr message to our manually connected peers that support avalanche
2022-05-19T08:27:47.707000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
            lambda: p.message_count.get(
                "getavaaddr", 0) > 1, timeout=5)
'''
2022-05-19T08:27:47.707000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 386, in run_test
    self.getavaaddr_manual_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 297, in getavaaddr_manual_test
    "getavaaddr", 0) > 1, timeout=5)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
            lambda: p.message_count.get(
                "getavaaddr", 0) > 1, timeout=5)
''' not true after 5.0 seconds
2022-05-19T08:27:47.757000Z TestFramework (INFO): Stopping nodes
2022-05-19T08:27:51.320000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_16
2022-05-19T08:27:51.320000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_16/test_framework.log
2022-05-19T08:27:51.320000Z TestFramework (ERROR): 
2022-05-19T08:27:51.321000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_16' to consolidate all logs
2022-05-19T08:27:51.321000Z TestFramework (ERROR): 
2022-05-19T08:27:51.321000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-05-19T08:27:51.321000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-05-19T08:27:51.321000Z TestFramework (ERROR):
====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof ======

------- Stdout: -------
2022-05-19T08:27:29.438000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_17
2022-05-19T08:27:32.012000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21088 due to [Errno 104] Connection reset by peer
2022-05-19T08:27:36.470000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21088 due to [Errno 104] Connection reset by peer
2022-05-19T08:27:39.801000Z TestFramework (INFO): Check we send a getavaaddr message to our avalanche outbound peers
2022-05-19T08:27:42.217000Z TestFramework (INFO): Check we send a getavaaddr message to our manually connected peers that support avalanche
2022-05-19T08:27:47.705000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
            lambda: p.message_count.get(
                "getavaaddr", 0) > 1, timeout=5)
'''
2022-05-19T08:27:47.705000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 386, in run_test
    self.getavaaddr_manual_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 297, in getavaaddr_manual_test
    "getavaaddr", 0) > 1, timeout=5)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
            lambda: p.message_count.get(
                "getavaaddr", 0) > 1, timeout=5)
''' not true after 5.0 seconds
2022-05-19T08:27:47.756000Z TestFramework (INFO): Stopping nodes
2022-05-19T08:27:51.317000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_17
2022-05-19T08:27:51.317000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_17/test_framework.log
2022-05-19T08:27:51.317000Z TestFramework (ERROR): 
2022-05-19T08:27:51.317000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220519_082651/abc_p2p_getavaaddr_17' to consolidate all logs
2022-05-19T08:27:51.317000Z TestFramework (ERROR): 
2022-05-19T08:27:51.318000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-05-19T08:27:51.318000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-05-19T08:27:51.318000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof

This revision was landed with ongoing or failed builds.May 19 2022, 16:07
This revision was automatically updated to reflect the committed changes.