-
Notifications
You must be signed in to change notification settings - Fork 199
/
interface.go
25 lines (21 loc) · 937 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package peer
import (
"github.com/ElrondNetwork/elrond-go/data/block"
"github.com/ElrondNetwork/elrond-go/storage"
)
// DataPool indicates the main functionality needed in order to fetch the required blocks from the pool
type DataPool interface {
MetaBlocks() storage.Cacher
IsInterfaceNil() bool
}
// shardMetaMediator implementations will act as proxies whenever a decision has to be made of
// executing a logic dependent on the chain we are currently in
type shardMetaMediator interface {
loadPreviousShardHeaders(header, previousHeader *block.MetaBlock) error
}
// shardMetaMediated is an interface describing the internal API that needs to be provided in order
// for shardMetaMediator implementations to be able to proxy towards the right handlers
type shardMetaMediated interface {
loadPreviousShardHeaders(header, previousHeader *block.MetaBlock) error
loadPreviousShardHeadersMeta(header *block.MetaBlock) error
}