rpc: getblockfrompeer

Co-authored-by: John Newbery <john@johnnewbery.com>
This commit is contained in:
Sjors Provoost
2021-05-13 18:51:47 +02:00
parent b884ababc2
commit dce8c4c381
8 changed files with 181 additions and 0 deletions

View File

@@ -3408,6 +3408,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, Block
// This requires some new chain data structure to efficiently look up if a
// block is in a chain leading to a candidate for best tip, despite not
// being such a candidate itself.
// Note that this would break the getblockfrompeer RPC
// TODO: deal better with return value and error conditions for duplicate
// and unrequested blocks.