p2p: move rlpx into separate package (#21464)
This change moves the RLPx protocol implementation into a separate package, p2p/rlpx. The new package can be used to establish RLPx connections for protocol testing purposes. Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
@ -18,11 +18,9 @@ package p2p
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@ -141,12 +139,3 @@ func TestEOFSignal(t *testing.T) {
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
func unhex(str string) []byte {
|
||||
r := strings.NewReplacer("\t", "", " ", "", "\n", "")
|
||||
b, err := hex.DecodeString(r.Replace(str))
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("invalid hex string: %q", str))
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
Reference in New Issue
Block a user