aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorShibe <[email protected]>2021-02-08 04:54:51 +0400
committerShibe <[email protected]>2021-02-08 16:52:55 +0400
commitef9242b9ec46a28690e49debe2c2364bb70be702 (patch)
treeb012eaa7e97e3ae70d99027ec5e31f3d08febc20 /src/validation.h
parentMerge pull request #1705 from rnicoll/block-download-timeout (diff)
downloaddiscoin-ef9242b9ec46a28690e49debe2c2364bb70be702.tar.xz
discoin-ef9242b9ec46a28690e49debe2c2364bb70be702.zip
Don't re-check AuxPoW when sending data to peers
Checking scrypt PoW is expensive and needless in this case. All block headers are already checked when they are accepted, and they will be checked again on the receiving end.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validation.h b/src/validation.h
index 386979a14..9e7305492 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -476,9 +476,9 @@ public:
/** Functions for disk access for blocks */
bool WriteBlockToDisk(const CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart);
-bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams);
-bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams);
-bool ReadBlockHeaderFromDisk(CBlockHeader& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams);
+bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams, bool fCheckPOW = true);
+bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams, bool fCheckPOW = true);
+bool ReadBlockHeaderFromDisk(CBlockHeader& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams, bool fCheckPOW = true);
/** Functions for validating blocks and updating the block tree */