MCPcopy Create free account
hub / github.com/ethstorage/es-node / getKvMetas

Method getKvMetas

ethstorage/storage_manager.go:529–544  ·  view source on GitHub ↗

Please note that the caller function must uses s.mu to protect the s.blobMetas reading in this function

(kvIndices []uint64)

Source from the content-addressed store, hash-verified

527
528// Please note that the caller function must uses s.mu to protect the s.blobMetas reading in this function
529func (s *StorageManager) getKvMetas(kvIndices []uint64) ([][32]byte, error) {
530 metas := [][32]byte{}
531 for _, i := range kvIndices {
532 meta, ok := s.blobMetas[i]
533 if ok {
534 metas = append(metas, meta)
535 } else if i >= s.kvEntryCount {
536 meta := [32]byte{}
537 new(big.Int).SetInt64(int64(i)).FillBytes(meta[0:5])
538 metas = append(metas, meta)
539 } else {
540 return nil, errors.New("meta not found in blobMetas")
541 }
542 }
543 return metas, nil
544}
545
546// CheckMeta will check the meta in the contract and local storage file.
547// If the meta in the contract is different with the one in local storage file,

Callers 3

CommitBlobsMethod · 0.95
CommitEmptyBlobsMethod · 0.95
CommitBlobMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected