mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Refactor CBlockIndex to make proof and dynafed fields optional.
This commit is contained in:
parent
29e62db08e
commit
68eb0864cb
9 changed files with 82 additions and 35 deletions
|
|
@ -2464,13 +2464,13 @@ void CChainState::UpdateTip(const CBlockIndex* pindexNew)
|
|||
!warning_messages.empty() ? strprintf(" warning='%s'", warning_messages.original) : "");
|
||||
|
||||
// Do some logging if dynafed parameters changed.
|
||||
if (pindexNew->pprev && !pindexNew->dynafed_params.IsNull()) {
|
||||
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()) {
|
||||
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()) {
|
||||
} 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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue