mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 15:36:19 +01:00
Add a CValidationInterface::NewPoWValidBlock callback
This commit is contained in:
@@ -3096,6 +3096,11 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
|
||||
return error("%s: %s", __func__, FormatStateMessage(state));
|
||||
}
|
||||
|
||||
// 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() && chainActive.Tip() == pindex->pprev)
|
||||
GetMainSignals().NewPoWValidBlock(pindex, pblock);
|
||||
|
||||
int nHeight = pindex->nHeight;
|
||||
|
||||
// Write block to history file
|
||||
|
||||
Reference in New Issue
Block a user