(kvIdx uint64, blob []byte, commit common.Hash)
| 592 | } |
| 593 | |
| 594 | func (s *StorageManager) tryWrite(kvIdx uint64, blob []byte, commit common.Hash) error { |
| 595 | ok, err := s.shardManager.TryWrite(kvIdx, blob, PrepareCommit(commit)) |
| 596 | if !ok { |
| 597 | return fmt.Errorf("failed to write blob: kv %d not exist", kvIdx) |
| 598 | } |
| 599 | if err != nil { |
| 600 | return fmt.Errorf("failed to write blob: kvIdx=%d, %w", kvIdx, err) |
| 601 | } |
| 602 | return nil |
| 603 | } |
| 604 | |
| 605 | // TryReadEncoded This function will read the encoded data from the local storage file. It also check whether the blob is empty or not synced, |
| 606 | // if they are these two cases, it will return err. |
no test coverage detected