mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge ElementsProject/elements#996: [forward port] Add logging for dynafed activation and transitions
0c9197e421Add logging for dynafed activation and transitions (Steven Roose) Pull request description: Forward port and fixup of https://github.com/ElementsProject/elements/pull/994. Closes https://github.com/ElementsProject/elements/issues/981. ACKs for top commit: apoelstra: ACK0c9197e421Tree-SHA512: df0586bff24e0842de0df19ca67821cc51105c1d03d2d950db5e4f4577cf38b3faa1155cdaa30a23c858ad3e0b0351e48b38034758798fe4546b8baf8c6c9747
This commit is contained in:
commit
9f34730d0f
1 changed files with 12 additions and 0 deletions
|
|
@ -2695,6 +2695,18 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
|
|||
if (num_unexpected_version > 0) {
|
||||
LogPrint(BCLog::VALIDATION, "%d of last 100 blocks have unexpected version\n", num_unexpected_version);
|
||||
}
|
||||
|
||||
// Do some logging if dynafed parameters changed.
|
||||
if (pindexNew->pprev && !pindexNew->dynafed_params.IsNull()) {
|
||||
int height = pindexNew->nHeight;
|
||||
uint256 hash = pindexNew->GetBlockHash();
|
||||
uint256 root = pindexNew->dynafed_params.m_current.CalculateRoot();
|
||||
if (pindexNew->pprev->dynafed_params.IsNull()) {
|
||||
LogPrintf("Dynafed activated in block %d:%s: %s\n", height, hash.GetHex(), root.GetHex());
|
||||
} else if (root != pindexNew->pprev->dynafed_params.m_current.CalculateRoot()) {
|
||||
LogPrintf("New dynafed parameters activated in block %d:%s: %s\n", height, hash.GetHex(), root.GetHex());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Disconnect m_chain's tip.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue