-
Notifications
You must be signed in to change notification settings - Fork 177
/
seals.go
30 lines (23 loc) · 927 Bytes
/
seals.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
26
27
28
29
30
// (c) 2019 Dapper Labs - ALL RIGHTS RESERVED
package storage
import (
"github.com/onflow/flow-go/model/flow"
)
// Seals represents persistent storage for seals.
type Seals interface {
// Store inserts the seal.
Store(seal *flow.Seal) error
// ByID retrieves the seal by the collection
// fingerprint.
ByID(sealID flow.Identifier) (*flow.Seal, error)
// HighestInFork retrieves the highest seal that was included in the
// fork up to (and including) the given blockID.
// This method should return
// - a seal for any block known to the node.
// - storage.ErrNotFound if blockID is unknown.
HighestInFork(blockID flow.Identifier) (*flow.Seal, error)
// FinalizedSealForBlock retrieves the finalized seal for the given block ID.
// Returns storage.ErrNotFound if blockID is unknown or no _finalized_ seal
// is known for the block.
FinalizedSealForBlock(blockID flow.Identifier) (*flow.Seal, error)
}