Skip to content

Commit

Permalink
[Refactor] Move Sapling ChainTip signal notification loop to use the …
Browse files Browse the repository at this point in the history
…latest connectTrace class structure
  • Loading branch information
furszy committed Jan 28, 2021
1 parent 8704d9d commit f5ac648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2386,7 +2386,7 @@ bool ActivateBestChain(CValidationState& state, std::shared_ptr<const CBlock> pb

// Sapling: notify wallet about the connected blocks ordered
// Get prev block tree anchor
CBlockIndex* pprev = pair.first->pprev;
CBlockIndex* pprev = trace.pindex->pprev;
SaplingMerkleTree oldSaplingTree;
bool isSaplingActive = (pprev) != nullptr &&
Params().GetConsensus().NetworkUpgradeActive(pprev->nHeight,
Expand All @@ -2398,7 +2398,7 @@ bool ActivateBestChain(CValidationState& state, std::shared_ptr<const CBlock> pb
}

// Sapling: Update cached incremental witnesses
GetMainSignals().ChainTip(pair.first, &block, oldSaplingTree);
GetMainSignals().ChainTip(trace.pindex, &block, oldSaplingTree);
}

break;
Expand Down

0 comments on commit f5ac648

Please sign in to comment.