Closed arik-so closed 6 months ago
Thanks for the fix! I'm going to ack this on the assumption that you tested it because you ran into the problem.
FTR the PR can't be tested because we are so far behind :(
ACK 87c95f6bda73453f12b28ae712e0e396b5401aed
Thanks so much!
As a matter of fact, I did test it, but to do so, I also added a test module to main.rs and separately ran a local server that returned different values for the warning
key based on a switch I could flip. Would it perhaps be helpful to add some unit tests besides the integration tests that could rely on a mock server?
Legend! You could add some tests if you like but I wouldn't bother putting too much effort in because the whole crate is in need of love.
fwiw: this was merged into Bitcoin Core master 2 days ago https://github.com/bitcoin/bitcoin/pull/29845
But I don't think it hurts having this in here early.
This is wild! My colleague ran into an issue with electrs because of that just yesterday, so must have been particularly unlucky with the timing of cloning bitcoind.
In recent versions of bitcoind,
getblockchaininfo
returns a result whosewarnings
key is no longer a string, but an array of strings. This PR allows the parsing of either. Fixes #352.