mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-23 22:15:54 +00:00
Initialize the selcted parent on GHOSTDAG.
This commit is contained in:
parent
7d20ee6b58
commit
16a83f9bac
@ -57,6 +57,7 @@ func (gh *ghostdagHelper) GHOSTDAG(stagingArea *model.StagingArea, blockCandidat
|
|||||||
maxBlueWork := new(big.Int)
|
maxBlueWork := new(big.Int)
|
||||||
maxBlueWork.SetUint64(0)
|
maxBlueWork.SetUint64(0)
|
||||||
maxBlueScore := uint64(0)
|
maxBlueScore := uint64(0)
|
||||||
|
selectedParent = parents[0]
|
||||||
// Find the selected parent.
|
// Find the selected parent.
|
||||||
for _, parent := range parents {
|
for _, parent := range parents {
|
||||||
parentBlockData, err := gh.dataStore.Get(gh.dbAccess, stagingArea, parent)
|
parentBlockData, err := gh.dataStore.Get(gh.dbAccess, stagingArea, parent)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user