Please note that the caller function must uses s.mu to protect the s.blobMetas reading in this function
(kvIndices []uint64)
| 527 | |
| 528 | // Please note that the caller function must uses s.mu to protect the s.blobMetas reading in this function |
| 529 | func (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, |
no outgoing calls
no test coverage detected