(commit common.Hash)
| 183 | } |
| 184 | |
| 185 | func PrepareCommit(commit common.Hash) common.Hash { |
| 186 | c := common.Hash{} |
| 187 | copy(c[0:HashSizeInContract], commit[0:HashSizeInContract]) |
| 188 | |
| 189 | // The first bit after data hash in the meta indicate whether this blob has been filled. 0 stands for NOT filled yet. |
| 190 | // We want to make sure this bit to be 1 when filling data |
| 191 | c[HashSizeInContract] = c[HashSizeInContract] | blobFillingMask |
| 192 | |
| 193 | return c |
| 194 | } |
| 195 | |
| 196 | // Reset This function must be called before calling any other funcs, it will setup a local L1 view for the node. |
| 197 | func (s *StorageManager) Reset(newL1 int64) error { |
no outgoing calls