Add Back Kademlia DHT to Prysm (#3557)

* serve nodes

* remove testing flag

* add back bootnode

* add dht

* add back dht

* gaz

* fix build

* bootnode works in runtime

* fix all references

* all tests pass

* remove feature flag

* separate out ports

* lint

* fix docker build

* use one error package
This commit is contained in:
Nishant Das
2019-09-23 22:54:16 +05:30
committed by Preston Van Loon
parent 5294a6c5af
commit b5b10a8d35
23 changed files with 265 additions and 97 deletions

View File

@@ -20,13 +20,14 @@ func TestBootnode_OK(t *testing.T) {
if err != nil {
t.Fatal(err)
}
privKey, _ := extractPrivateKey()
cfg := discover.Config{
PrivateKey: extractPrivateKey(),
PrivateKey: privKey,
}
listener := createListener(ipAddr, 4000, cfg)
defer listener.Close()
cfg.PrivateKey = extractPrivateKey()
cfg.PrivateKey, _ = extractPrivateKey()
bootNode, err := enode.Parse(enode.ValidSchemes, listener.Self().String())
if err != nil {
t.Fatal(err)
@@ -72,7 +73,7 @@ func TestPrivateKey_ParsesCorrectly(t *testing.T) {
}
*privateKey = fmt.Sprintf("%x", pk)
extractedKey := extractPrivateKey()
extractedKey, _ := extractPrivateKey()
rawKey := (*ecdsa.PrivateKey)((*btcec.PrivateKey)(privKey.(*crypto.Secp256k1PrivateKey)))