MCPcopy
hub / github.com/hyperledger/fabric / kvLedger

Struct kvLedger

core/ledger/kvledger/kv_ledger.go:51–80  ·  view source on GitHub ↗

kvLedger provides an implementation of `ledger.PeerLedger`. This implementation provides a key-value based data model

Source from the content-addressed store, hash-verified

49// kvLedger provides an implementation of `ledger.PeerLedger`.
50// This implementation provides a key-value based data model
51type kvLedger struct {
52 ledgerID string
53 bootSnapshotMetadata *SnapshotMetadata
54 blockStore *blkstorage.BlockStore
55
56 pvtdataStoreLock sync.Mutex
57 pvtdataStore *pvtdatastorage.Store
58
59 txmgr *txmgr.LockBasedTxMgr
60 historyDB *history.DB
61 configHistoryRetriever *collectionConfigHistoryRetriever
62 snapshotMgr *snapshotMgr
63 // this RWMutex provides atomicity to commit a block to the block-storage
64 // and to apply its effects on the state database
65 //
66 // for more details see https://github.com/hyperledger/fabric/pull/4694
67 blockAPIsRWLock *sync.RWMutex
68 stats *ledgerStats
69 commitHash []byte
70 hashProvider ledger.HashProvider
71 config *ledger.Config
72
73 // isPvtstoreAheadOfBlkstore is read during missing pvtData
74 // reconciliation and may be updated during a regular block commit.
75 // Hence, we use atomic value to ensure consistent read.
76 isPvtstoreAheadOfBlkstore atomic.Value
77
78 commitNotifierLock sync.Mutex
79 commitNotifier *commitNotifier
80}
81
82type lgrInitializer struct {
83 ledgerID string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected