mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-14 05:20:11 +00:00

* resolveSingleBlockStatus: If the block being resolved is not going to be the next selectedTip - set it's diffParent to be the old selectedTip * resolveSingleBlockStatus: If the block being resolved is going to be the next selectedTip - set it as old selectedTip's diffChild * Remove any mentions of virtualDiffParents * If block is genesis - don't do all the mumbo-jumbo with oldSelectedTip * Check an unchecked error * Write a better log message
16 lines
521 B
Go
16 lines
521 B
Go
package consensusstatemanager
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
func (csm *consensusStateManager) stageDiff(blockHash *externalapi.DomainHash,
|
|
utxoDiff externalapi.UTXODiff, utxoDiffChild *externalapi.DomainHash) {
|
|
|
|
log.Debugf("stageDiff start for block %s", blockHash)
|
|
defer log.Debugf("stageDiff end for block %s", blockHash)
|
|
|
|
log.Debugf("Staging block %s as the diff child of %s", utxoDiffChild, blockHash)
|
|
csm.utxoDiffStore.Stage(blockHash, utxoDiff, utxoDiffChild)
|
|
}
|