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
| 97 | // and issuance memory. The Chain type uses Store to load state |
| 98 | // from storage and persist validated data. |
| 99 | type Store interface { |
| 100 | Height(context.Context) (uint64, error) |
| 101 | GetBlock(context.Context, uint64) (*bc.Block, error) |
| 102 | LatestSnapshot(context.Context) (*state.Snapshot, error) |
| 103 | |
| 104 | SaveBlock(context.Context, *bc.Block) error |
| 105 | FinalizeHeight(context.Context, uint64) error |
| 106 | SaveSnapshot(context.Context, *state.Snapshot) error |
| 107 | } |
| 108 | |
| 109 | // Chain provides a complete, minimal blockchain database. It |
| 110 | // delegates the underlying storage to other objects, and uses |
no outgoing calls
no test coverage detected