MCPcopy Index your code
hub / github.com/chain/Core / Store

Interface Store

protocol/protocol.go:73–81  ·  view source on GitHub ↗

Store provides storage for blockchain data: blocks and state tree snapshots. Note, this is different from a state snapshot. A state snapshot provides access to the state at a given point in time -- outputs and issuance memory. The Chain type uses Store to load state from storage and persist validat

Source from the content-addressed store, hash-verified

71// and issuance memory. The Chain type uses Store to load state
72// from storage and persist validated data.
73type Store interface {
74 Height(context.Context) (uint64, error)
75 GetBlock(context.Context, uint64) (*legacy.Block, error)
76 LatestSnapshot(context.Context) (*state.Snapshot, uint64, error)
77
78 SaveBlock(context.Context, *legacy.Block) error
79 FinalizeBlock(context.Context, uint64) error
80 SaveSnapshot(context.Context, uint64, *state.Snapshot) error
81}
82
83// Chain provides a complete, minimal blockchain database. It
84// delegates the underlying storage to other objects, and uses

Callers 76

NewChainFunction · 0.65
RecoverMethod · 0.65
makeEmptyBlockFunction · 0.65
MakeBlockFunction · 0.65
buildHandlerMethod · 0.65
finalizeTxWaitMethod · 0.65
leaderInfoMethod · 0.65
RecoverMethod · 0.65
makeEmptyBlockFunction · 0.65
GetBlockMethod · 0.65
InitialFunction · 0.65

Implementers 2

MemStoreprotocol/prottest/memstore/memstore.go
Storecore/txdb/store.go

Calls

no outgoing calls

Tested by

no test coverage detected