aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2021-12-08 20:16:36 +0700
committerSjors Provoost <sjors@sprovoost.nl>2021-12-24 16:29:03 +0100
commit34d5399211eeb61e7e7961c301fb2ddea8aa3f6a (patch)
treeadc860d9eaeb6ae1de648eef86415988a7fd8352 /src/net_processing.h
parent60243cac7286e4c4bdda7094bef4cf6d1564b583 (diff)
downloadbitcoin-34d5399211eeb61e7e7961c301fb2ddea8aa3f6a.tar.xz
rpc: more detailed errors for getblockfrompeer
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 2b22d8ce85..2c8ae05a26 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -47,9 +47,9 @@ public:
*
* @param[in] id The peer id
* @param[in] block_index The blockindex
- * @returns Whether a request was successfully made
+ * @returns std::nullopt if a request was successfully made, otherwise an error message
*/
- virtual bool FetchBlock(NodeId id, const CBlockIndex& block_index) = 0;
+ virtual std::optional<std::string> FetchBlock(NodeId id, const CBlockIndex& block_index) = 0;
/** Begin running background tasks, should only be called once */
virtual void StartScheduledTasks(CScheduler& scheduler) = 0;