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

Method GetCurrentBlockHash

core/committer/committer_impl.go:85–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83}
84
85func (lc *LedgerCommitter) GetCurrentBlockHash() ([]byte, error) {
86 info, err := lc.GetBlockchainInfo()
87 if err != nil {
88 logger.Errorf("Cannot get blockchain info, %s", info)
89 return nil, err
90 }
91
92 return info.CurrentBlockHash, nil
93}
94
95// DoesPvtDataInfoExistInLedger returns true if the ledger has pvtdata info
96// about a given block number.

Callers

nothing calls this directly

Calls 2

GetBlockchainInfoMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected