Svarog fb6c9c8f21
Remove virtual diff parents (#1550)
* 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
2021-02-23 17:19:35 +02:00

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)
}