aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2021-05-13 18:51:47 +0200
committerSjors Provoost <sjors@sprovoost.nl>2021-12-02 13:16:18 +0700
commitdce8c4c38111556ca480aa0e63c46b71f66b508f (patch)
treed43051c4e187c70cf3d700d8eb308012811b041a /src/net_processing.h
parentb884ababc29ce963826d8a4327ed6a5e629ff175 (diff)
downloadbitcoin-dce8c4c38111556ca480aa0e63c46b71f66b508f.tar.xz
rpc: getblockfrompeer
Co-authored-by: John Newbery <john@johnnewbery.com>
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 27bc40687a..6c18e8ddfa 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -42,6 +42,16 @@ public:
CTxMemPool& pool, bool ignore_incoming_txs);
virtual ~PeerManager() { }
+ /**
+ * Attempt to manually fetch block from a given peer. We must already have the header.
+ *
+ * @param[in] id The peer id
+ * @param[in] hash The block hash
+ * @param[in] pindex The blockindex
+ * @returns Whether a request was successfully made
+ */
+ virtual bool FetchBlock(NodeId id, const uint256& hash, const CBlockIndex& pindex) = 0;
+
/** Begin running background tasks, should only be called once */
virtual void StartScheduledTasks(CScheduler& scheduler) = 0;