mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge bitcoin/bitcoin#23706: rpc: getblockfrompeer followups
923312fbf6rpc: use peer_id, block_hash for FetchBlock (Sjors Provoost)34d5399211rpc: more detailed errors for getblockfrompeer (Sjors Provoost)60243cac72rpc: turn already downloaded into error in getblockfrompeer (Sjors Provoost)809d66bb65rpc: clarify getblockfrompeer behavior when called multiple times (Sjors Provoost)0e3d7c5ee1refactor: drop redundant hash argument from FetchBlock (Sjors Provoost)8d1a3e6498rpc: allow empty JSON object result (Sjors Provoost)bfbf91d0b2test: fancier Python for getblockfrompeer (Sjors Provoost) Pull request description: Followups from #20295. ACKs for top commit: jonatack: ACK923312fbf6📦 fjahr: tested ACK923312fbf6Tree-SHA512: da9eca76e302e249409c9d7f0d16cca668ed981e2ab6ca2d1743dad0d830b94b1bc5ffb9028a00764b863201945c273cc8f4409a4c9ca3817830007dffa2bc20
This commit is contained in:
@@ -830,6 +830,10 @@ void RPCResult::ToSections(Sections& sections, const OuterType outer_type, const
|
||||
return;
|
||||
}
|
||||
case Type::OBJ_DYN:
|
||||
case Type::OBJ_EMPTY: {
|
||||
sections.PushSection({indent + maybe_key + "{}", Description("empty JSON object")});
|
||||
return;
|
||||
}
|
||||
case Type::OBJ: {
|
||||
sections.PushSection({indent + maybe_key + "{", Description("json object")});
|
||||
for (const auto& i : m_inner) {
|
||||
@@ -879,6 +883,7 @@ bool RPCResult::MatchesType(const UniValue& result) const
|
||||
return UniValue::VARR == result.getType();
|
||||
}
|
||||
case Type::OBJ_DYN:
|
||||
case Type::OBJ_EMPTY:
|
||||
case Type::OBJ: {
|
||||
return UniValue::VOBJ == result.getType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user