mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 21:10:12 +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
11 lines
256 B
Go
11 lines
256 B
Go
package model
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// BlockIterator is an iterator over blocks according to some order.
|
|
type BlockIterator interface {
|
|
First() bool
|
|
Next() bool
|
|
Get() (*externalapi.DomainHash, error)
|
|
}
|