diff --git a/src/validation.cpp b/src/validation.cpp index 0e911990fb..b1d777b2cc 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -6085,9 +6085,6 @@ bool ChainstateManager::AcceptBlock(const std::shared_ptr& pblock, return error("%s: %s", __func__, state.ToString()); } - // Header is valid/has work, merkle tree and segwit merkle tree are good...RELAY NOW - // (but if it does not build on our best tip, let the SendMessages loop relay it) - // Write block to history file if (fNewBlock) *fNewBlock = true; try { @@ -6112,6 +6109,11 @@ bool ChainstateManager::AcceptBlock(const std::shared_ptr& pblock, CheckBlockIndex(); + // Header is valid/has work, merkle tree and segwit merkle tree are good...RELAY NOW + // (but if it does not build on our best tip, let the SendMessages loop relay it) + if (!IsInitialBlockDownload() && ActiveTip() == pindex->pprev) + GetMainSignals().NewPoWValidBlock(pindex, pblock); + return true; }