Documentation ¶
Index ¶
- Variables
- type EndorserPvtSimulationResults
- type RWSetScanner
- type RwsetScanner
- type Store
- func (s *Store) GetMinTransientBlkHt() (uint64, error)
- func (s *Store) GetTxPvtRWSetByTxid(txid string, filter ledger.PvtNsCollFilter) (RWSetScanner, error)
- func (s *Store) Persist(txid string, blockHeight uint64, ...) error
- func (s *Store) PurgeBelowHeight(maxBlockNumToRetain uint64) error
- func (s *Store) PurgeByTxids(txids []string) error
- func (s *Store) Shutdown()
- type StoreProvider
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EndorserPvtSimulationResults ¶
type EndorserPvtSimulationResults struct { ReceivedAtBlockHeight uint64 PvtSimulationResultsWithConfig *transientstore.TxPvtReadWriteSetWithConfigInfo }
EndorserPvtSimulationResults captures the details of the simulation results specific to an endorser
type RWSetScanner ¶
type RWSetScanner interface { // Next returns the next EndorserPvtSimulationResults from the RWSetScanner. // It may return nil, nil when it has no further data, and also may return an error // on failure Next() (*EndorserPvtSimulationResults, error) // Close frees the resources associated with this RWSetScanner Close() }
RWSetScanner provides an iterator for EndorserPvtSimulationResults
type RwsetScanner ¶
type RwsetScanner struct {
// contains filtered or unexported fields
}
RwsetScanner helps iterating over results
func (*RwsetScanner) Close ¶
func (scanner *RwsetScanner) Close()
Close releases resource held by the iterator
func (*RwsetScanner) Next ¶
func (scanner *RwsetScanner) Next() (*EndorserPvtSimulationResults, error)
Next moves the iterator to the next key/value pair. It returns <nil, nil> when the iterator is exhausted.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
store holds an instance of a levelDB.
func (*Store) GetMinTransientBlkHt ¶
GetMinTransientBlkHt returns the lowest block height remaining in transient store
func (*Store) GetTxPvtRWSetByTxid ¶
func (s *Store) GetTxPvtRWSetByTxid(txid string, filter ledger.PvtNsCollFilter) (RWSetScanner, error)
GetTxPvtRWSetByTxid returns an iterator due to the fact that the txid may have multiple private write sets persisted from different endorsers.
func (*Store) Persist ¶
func (s *Store) Persist(txid string, blockHeight uint64, privateSimulationResultsWithConfig *transientstore.TxPvtReadWriteSetWithConfigInfo) error
Persist stores the private write set of a transaction along with the collection config in the transient store based on txid and the block height the private data was received at
func (*Store) PurgeBelowHeight ¶
PurgeBelowHeight removes private write sets at block height lesser than a given maxBlockNumToRetain. In other words, Purge only retains private write sets that were persisted at block height of maxBlockNumToRetain or higher. Though the private write sets stored in transient store is removed by coordinator using PurgebyTxids() after successful block commit, PurgeBelowHeight() is still required to remove orphan entries (as transaction that gets endorsed may not be submitted by the client for commit)
func (*Store) PurgeByTxids ¶
PurgeByTxids removes private write sets of a given set of transactions from the transient store. PurgeByTxids() is expected to be called by coordinator after committing a block to ledger.