mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-24 15:56:42 +00:00

* [NOD-1528] Make data stores copy data on stage * [NOD-1528] Add proto objects to serialize consensus state objects * [NOD-1528] Fix receiver names * [NOD-1528] Add copy to block store and utxo diff staging * [NOD-1528] Return errors where needed
22 lines
898 B
Go
22 lines
898 B
Go
package model
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// ConsensusStateStore represents a store for the current consensus state
|
|
type ConsensusStateStore interface {
|
|
Store
|
|
IsStaged() bool
|
|
|
|
StageVirtualUTXODiff(virtualUTXODiff *UTXODiff) error
|
|
StageVirtualUTXOSet(virtualUTXOSetIterator ReadOnlyUTXOSetIterator) error
|
|
UTXOByOutpoint(dbContext DBReader, outpoint *externalapi.DomainOutpoint) (*externalapi.UTXOEntry, error)
|
|
HasUTXOByOutpoint(dbContext DBReader, outpoint *externalapi.DomainOutpoint) (bool, error)
|
|
VirtualUTXOSetIterator(dbContext DBReader) (ReadOnlyUTXOSetIterator, error)
|
|
|
|
StageVirtualDiffParents(virtualDiffParents []*externalapi.DomainHash) error
|
|
VirtualDiffParents(dbContext DBReader) ([]*externalapi.DomainHash, error)
|
|
|
|
StageTips(tipHashes []*externalapi.DomainHash) error
|
|
Tips(dbContext DBReader) ([]*externalapi.DomainHash, error)
|
|
}
|