mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Split deletePastBlocks into sub-routines * Remove SelectedParentIterator, and refactor SelectedChildIterator to support First and Error * Implement PruneAllBlocks * Prune all blocks in the store * Prune only blocks that are below the pruning point * Defer call onEnd of LogAndMeasureExecutionTime * Handle a forgotten error * Minor style fixes
13 lines
385 B
Go
13 lines
385 B
Go
package model
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// BlockHeap represents a heap of block hashes, providing a priority-queue functionality
|
|
type BlockHeap interface {
|
|
Push(blockHash *externalapi.DomainHash) error
|
|
PushSlice(blockHash []*externalapi.DomainHash) error
|
|
Pop() *externalapi.DomainHash
|
|
Len() int
|
|
ToSlice() []*externalapi.DomainHash
|
|
}
|