You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
interfaces: findAncestorByHash returns true for an unknown descendant #36472
While testing an external python capnp ipc client on regtest, I found that findAncestorByHash returns success for an unknown descendant hash when the ancestor is known. I also reproduced this directly on master.
Expected behaviour
findAncestorByHash should return false when the descendant hash is unknown
Steps to reproduce
Add this to the existing findAncestorByHash test in src/test/interfaces_tests.cpp to reproduce the issue
test/interfaces_tests.cpp:97: error: in "interfaces_tests/findAncestorByHash": check !chain->findAncestorByHash(uint256{}, active[0]->GetBlockHash()) has failed
Activity
fanquake commentedon Oct 8, 2026
cc @Sjors @ryanofsky
psychemist commentedon Oct 10, 2026
i followed this steps above to reproduce this issue:
findAncestorByHashtest tosrc/test/interfaces_tests.cppSjors commentedon Oct 13, 2026
How? Are you using #29409?
enochaz commentedon Oct 13, 2026
Yes, the python ipc client is using the chain interface in #29409, and then reproduced it separately on master
ryanofsky commentedon Oct 14, 2026
Thanks for the testing and report! I created #36520 to fix this and a few similar issues.
interfaces: Fix findAncestorByHash returning true for unknown block