MCPcopy Create free account
hub / github.com/CPChain/chain / TestEmptyStateSync

Function TestEmptyStateSync

core/state/sync_test.go:125–130  ·  view source on GitHub ↗

Tests that an empty state is not scheduled for syncing.

(t *testing.T)

Source from the content-addressed store, hash-verified

123
124// Tests that an empty state is not scheduled for syncing.
125func TestEmptyStateSync(t *testing.T) {
126 empty := common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
127 if req := NewStateSync(empty, database.NewMemDatabase()).Missing(1); len(req) != 0 {
128 t.Errorf("content requested for empty state: %v", req)
129 }
130}
131
132// Tests that given a root hash, a state can sync iteratively on a single thread,
133// requesting retrieval tasks and returning all of them in one go.

Callers

nothing calls this directly

Calls 1

NewStateSyncFunction · 0.85

Tested by

no test coverage detected