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

Function TestSyncWithExcludedList

ethstorage/p2p/protocol/sync_test.go:964–976  ·  view source on GitHub ↗

TestSyncWithExcludedList test sync process with local node support a shard and sync data from 1 remote peer which has excluded list, it should not be sync done.

(t *testing.T)

Source from the content-addressed store, hash-verified

962// TestSyncWithExcludedList test sync process with local node support a shard and sync data from 1 remote peer
963// which has excluded list, it should not be sync done.
964func TestSyncWithExcludedList(t *testing.T) {
965 var (
966 kvSize = defaultChunkSize
967 kvEntries = uint64(16)
968 lastKvIndex = uint64(16)
969 )
970 remotePeers := []*remotePeer{{
971 shards: []uint64{0},
972 excludedList: getRandomU64InRange(make(map[uint64]struct{}), 0, 15, 3),
973 }}
974
975 testSync(t, defaultChunkSize, kvSize, kvEntries, []uint64{0}, lastKvIndex, defaultEncodeType, 3, remotePeers, false)
976}
977
978// TestSyncDiffEncodeType test sync process with local node support a shard and sync data from 1 remote peer
979// with different encode type, they should sync done.

Callers

nothing calls this directly

Calls 2

getRandomU64InRangeFunction · 0.85
testSyncFunction · 0.85

Tested by

no test coverage detected