diff options
| author | Shibe <[email protected]> | 2021-02-08 04:54:51 +0400 |
|---|---|---|
| committer | Shibe <[email protected]> | 2021-02-08 16:52:55 +0400 |
| commit | ef9242b9ec46a28690e49debe2c2364bb70be702 (patch) | |
| tree | b012eaa7e97e3ae70d99027ec5e31f3d08febc20 /src/validation.h | |
| parent | Merge pull request #1705 from rnicoll/block-download-timeout (diff) | |
| download | discoin-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.h | 6 |
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 */ |