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