mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 03:51:20 +00:00
23 lines
516 B
Go
23 lines
516 B
Go
|
package persistence
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/ledgerwatch/erigon/cl/cltypes"
|
||
|
"github.com/ledgerwatch/erigon/cl/sentinel/peers"
|
||
|
)
|
||
|
|
||
|
type BlockSource interface {
|
||
|
GetRange(ctx context.Context, from uint64, count uint64) ([]*peers.PeeredObject[*cltypes.SignedBeaconBlock], error)
|
||
|
PurgeRange(ctx context.Context, from uint64, count uint64) error
|
||
|
}
|
||
|
|
||
|
type BeaconChainWriter interface {
|
||
|
WriteBlock(block *cltypes.SignedBeaconBlock) error
|
||
|
}
|
||
|
|
||
|
type BeaconChainDatabase interface {
|
||
|
BlockSource
|
||
|
BeaconChainWriter
|
||
|
}
|