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

Function TestStorageManager_DownloadAllMeta

ethstorage/storage_manager_test.go:237–256  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

235}
236
237func TestStorageManager_DownloadAllMeta(t *testing.T) {
238 setup(t)
239 err := storageManager.DownloadAllMetas(context.Background(), 4)
240 if err != nil {
241 t.Fatal("failed to Downloand Finished", err)
242 }
243
244 kvIndex := uint64(3)
245 _, h := createBlob(kvIndex)
246 bs, success, err := storageManager.TryReadMeta(kvIndex)
247 if err != nil || !success {
248 t.Fatal("failed to read meta", err)
249 }
250
251 meta := common.Hash{}
252 copy(meta[:], bs)
253 if meta != PrepareCommit(h) {
254 t.Fatal("failed to compare meta", err)
255 }
256}

Callers

nothing calls this directly

Calls 5

createBlobFunction · 0.85
PrepareCommitFunction · 0.85
setupFunction · 0.70
DownloadAllMetasMethod · 0.65
TryReadMetaMethod · 0.65

Tested by

no test coverage detected