aboutsummaryrefslogtreecommitdiff
path: root/src/chain.cpp
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/chain.cpp
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/chain.cpp')
-rw-r--r--src/chain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chain.cpp b/src/chain.cpp
index 2ce98818f..e618f0568 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -10,7 +10,7 @@ using namespace std;
/* Moved here from the header, because we need auxpow and the logic
becomes more involved. */
-CBlockHeader CBlockIndex::GetBlockHeader(const Consensus::Params& consensusParams) const
+CBlockHeader CBlockIndex::GetBlockHeader(const Consensus::Params& consensusParams, bool fCheckPOW) const
{
CBlockHeader block;
@@ -21,7 +21,7 @@ CBlockHeader CBlockIndex::GetBlockHeader(const Consensus::Params& consensusParam
have to read the actual *header*, not the full block. */
if (block.IsAuxpow())
{
- ReadBlockHeaderFromDisk(block, this, consensusParams);
+ ReadBlockHeaderFromDisk(block, this, consensusParams, fCheckPOW);
return block;
}