Uh oh!
There was an error while loading. Please reload this page.
bitcoind: fix raw TX fetching when using REST - #1006
Conversation
I've assigned @tnull as a reviewer! |
tnull
left a comment
There was a problem hiding this comment.
Thanks, good catch!
While you're here, mind adding a second commit that changes the range in random_chain_source to also cover the REST arm (i.e. should use 0..4 I believe), which would give us improved test coverage for the REST chain source?
tnull
left a comment
There was a problem hiding this comment.
Thanks!
The CI change showed that we have another bug in the REST client implementation. Landing this and working on a fix for it.
Uh oh!
There was an error while loading. Please reload this page.
Bitcoin Core's REST headers endpoint cannot serve headers from a stale branch. This prevented REST-backed nodes from finding a common ancestor and following the replacement chain after a reorg. In #1006 we enabled bitcoind REST chain source support in CI, which exposed this failure. Co-Authored-By: HAL 9000
I noticed this issue while testing switching my nodes from the Electrum ChainSource to bitcoind.
An alternate fix here would also be to fetch the TX as binary instead of JSON - I can put up a PR for that if that's preferred.