swarm, p2p: Prerequities for ENR replacing handshake (#19275)
* swarm/api, swarm/network, p2p/simulations: Prerequisites for handshake remove * swarm, p2p: Add full sim node configs for protocoltester * swarm/network: Make stream package pass tests * swarm/network: Extract peer and addr types out of protocol file * p2p, swarm: Make p2p/protocols tests pass + rename types.go * swarm/network: Deactivate ExecAdapter test until binary ENR prep * swarm/api: Remove comments * swarm/network: Uncomment bootnode record load
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
|
||||
@@ -183,7 +184,13 @@ func newStreamerTester(registryOptions *RegistryOptions) (*p2ptest.ProtocolTeste
|
||||
streamer.Close()
|
||||
removeDataDir()
|
||||
}
|
||||
protocolTester := p2ptest.NewProtocolTester(addr.ID(), 1, streamer.runProtocol)
|
||||
prvkey, err := crypto.GenerateKey()
|
||||
if err != nil {
|
||||
removeDataDir()
|
||||
return nil, nil, nil, nil, err
|
||||
}
|
||||
|
||||
protocolTester := p2ptest.NewProtocolTester(prvkey, 1, streamer.runProtocol)
|
||||
|
||||
err = waitForPeers(streamer, 10*time.Second, 1)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user