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

Method InitializeMetadata

core/chaincode/lifecycle/cache.go:614–625  ·  view source on GitHub ↗
(channel string)

Source from the content-addressed store, hash-verified

612}
613
614func (c *Cache) InitializeMetadata(channel string) {
615 c.mutex.RLock()
616 defer c.mutex.RUnlock()
617
618 ms, err := c.retrieveChaincodesMetadataSetWhileLocked(channel)
619 if err != nil {
620 logger.Warningf("no metadata found on channel '%s', err %s", channel, err)
621 return
622 }
623
624 c.MetadataHandler.InitializeMetadata(channel, ms)
625}
626
627func (c *Cache) retrieveChaincodesMetadataSetWhileLocked(channelID string) (chaincode.MetadataSet, error) {
628 channelChaincodes, ok := c.definedChaincodes[channelID]

Callers 1

serveFunction · 0.95

Calls 3

WarningfMethod · 0.65
InitializeMetadataMethod · 0.65

Tested by

no test coverage detected