diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-23 19:03:07 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-23 19:03:10 +0200 |
commit | 44037a29129a830fd9c9580f0818387756cfd7d3 (patch) | |
tree | c342bc8afb2dc6ca6bc6f70402c8b679a36c9d2a /src/base58.cpp | |
parent | fbb90c44ac8a4121ce6ba7fcbf864084f35734ba (diff) | |
parent | a17c5e96b602fed65166037b78d98605e915206b (diff) |
Merge bitcoin/bitcoin#25176: Fix frequent -netinfo JSON errors from missing getpeerinfo#relaytxes
a17c5e96b602fed65166037b78d98605e915206b Rename NetinfoRequestHandler::is_block_relay data member to is_tx_relay (Jon Atack)
f0bb7db34ce0c8e62dad7d33c1c6b1f49ca81c5e Fix frequent -netinfo JSON errors from null getpeerinfo#relaytxes (Jon Atack)
Pull request description:
CLI -netinfo frequently returns "error: JSON value is not a boolean as expected" since the merge of #21160, which moved fRelayTxes (renamed to m_relay_txs in that pull) from CNodeStats to CNodeStateStats.
This change made getpeerinfo "relaytxes" an optional field that can return UniValue IsNull(). It is the only optional field consumed by -netinfo where the latter didn't already handle that case. See also https://github.com/bitcoin/bitcoin/pull/24691.
Also rename the NetinfoRequestHandler::is_block_relay data member to is_tx_relay and inverse its boolean logic. The naming is out of date and incorrect, as lack of request of tx relay does not imply block relay, and a preference for tx relay doesn't imply that block relay isn't happening. Thanks to Marco Falke and Martin Zumsande for their feedback on this.
(I may look at reducing the number of optional node stats fields via refactoring at the net processing level, but ongoing refactoring there may make that slow or complicated and this is a one-line fix that works now.)
ACKs for top commit:
mzumsande:
Code review ACK a17c5e96b602fed65166037b78d98605e915206b
Tree-SHA512: dc54ce80b78122874a6794555f99e5b328a1574b52bb3e7f974c699c2b759a60ea0807a6483c5bc0414a950d853c0eeeb13dcc1b790d3917c6ee4c9c99fe159f
Diffstat (limited to 'src/base58.cpp')
0 files changed, 0 insertions, 0 deletions