mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-22 23:07:04 +00:00

* Convert BlockGHOSTDAGData from an interface to a public struct with getters * Move hashes.Less to externalapi so it can access the hashes directly without copying * Reduce calls to ghostdagstore.Get in blueWindow * Simplify the logic in RequiredDifficulty and reuse big.Int * Remove bigintpool as its no longer used * Use ChooseSelectedParent in RequiredDifficulty instead of looping over the parents * Remove comment
12 lines
377 B
Go
12 lines
377 B
Go
package model
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// GHOSTDAGDataStore represents a store of BlockGHOSTDAGData
|
|
type GHOSTDAGDataStore interface {
|
|
Store
|
|
Stage(blockHash *externalapi.DomainHash, blockGHOSTDAGData *BlockGHOSTDAGData)
|
|
IsStaged() bool
|
|
Get(dbContext DBReader, blockHash *externalapi.DomainHash) (*BlockGHOSTDAGData, error)
|
|
}
|