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

Function connect

ethstorage/p2p/protocol/sync_test.go:322–330  ·  view source on GitHub ↗
(t *testing.T, a, b host.Host, as, bs map[common.Address][]uint64)

Source from the content-addressed store, hash-verified

320}
321
322func connect(t *testing.T, a, b host.Host, as, bs map[common.Address][]uint64) {
323 pinfo := a.Peerstore().PeerInfo(a.ID())
324 a.Peerstore().Put(b.ID(), EthStorageENRKey, ConvertToContractShards(bs))
325 b.Peerstore().Put(a.ID(), EthStorageENRKey, ConvertToContractShards(as))
326 err := b.Connect(context.Background(), pinfo)
327 if err != nil {
328 t.Fatal(err)
329 }
330}
331
332func createLocalHostAndSyncClient(t *testing.T, chainID *big.Int, db ethdb.Database,
333 storageManager StorageManager, metrics SyncClientMetrics, mux *event.Feed) (host.Host, *SyncClient) {

Callers 5

TestSync_RequestL2RangeFunction · 0.85
TestSync_RequestL2ListFunction · 0.85
testSyncFunction · 0.85
TestAddPeerDuringSyncingFunction · 0.85
TestAddPeerAfterSyncDoneFunction · 0.85

Calls 3

ConvertToContractShardsFunction · 0.85
PeerInfoMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected