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

Method CheckMeta

ethstorage/storage_manager.go:551–555  ·  view source on GitHub ↗

CheckMeta will check the meta in the contract and local storage file. If the meta in the contract is different with the one in local storage file, it will return NewCommitMismatchError Otherwise, it will return nil It will also return the meta in the contract in each case.

(kvIdx uint64)

Source from the content-addressed store, hash-verified

549// Otherwise, it will return nil
550// It will also return the meta in the contract in each case.
551func (s *StorageManager) CheckMeta(kvIdx uint64) (common.Hash, error) {
552 s.mu.Lock()
553 defer s.mu.Unlock()
554 return s.checkMeta(kvIdx)
555}
556
557func (s *StorageManager) checkMeta(kvIdx uint64) (common.Hash, error) {
558 metaInContract, err := s.l1Source.GetKvMetas([]uint64{kvIdx}, rpc.FinalizedBlockNumber.Int64())

Callers

nothing calls this directly

Calls 1

checkMetaMethod · 0.95

Tested by

no test coverage detected