mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Add logging for dynafed activation and transitions
This commit is contained in:
parent
b1a40781c6
commit
ca827fcd75
1 changed files with 14 additions and 0 deletions
|
|
@ -3555,6 +3555,20 @@ static bool ContextualCheckDynaFedHeader(const CBlockHeader& block, CValidationS
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do some logging if parameters changed.
|
||||
auto parent = pindexPrev->dynafed_params.m_current;
|
||||
if (dynafed_params.m_current != parent) {
|
||||
int height = pindexPrev->nHeight + 1;
|
||||
std::string hash = block.GetHash().GetHex();
|
||||
std::string root = dynafed_params.m_current.CalculateRoot().GetHex();
|
||||
if (parent.IsNull()) {
|
||||
LogPrintf("Dynafed activated in block %d:%s: %s\n", height, hash, root);
|
||||
} else {
|
||||
LogPrintf("New dynafed parameters activated in block %d:%s: %s\n", height, hash, root);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue