mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge ElementsProject/elements#994: [elements-0.18] Add logging for dynafed activation and transitions
ca827fcd75 Add logging for dynafed activation and transitions (Steven Roose)
Pull request description:
Relating https://github.com/ElementsProject/elements/issues/981.
Needs forward port.
Top commit has no ACKs.
Tree-SHA512: 0c22b7e7d149fa4664f4fc0d37b644e2fc1995f2c7764c8f444a331d04216da1a9b7914d54df8ab15b20aa899eddd9834bd4cbe605c1ca3fd360521c9f5f0c1d
This commit is contained in:
commit
b181708ef3
1 changed files with 14 additions and 0 deletions
|
|
@ -3564,6 +3564,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