mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
p2p: send EIP-8 auth when RLPX_EIP8 is set in env
This commit is contained in:
parent
caf3ad1e85
commit
2817d1d6dc
1 changed files with 7 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ import (
|
|||
"io"
|
||||
mrand "math/rand"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -271,7 +272,12 @@ func initiatorEncHandshake(conn io.ReadWriter, prv *ecdsa.PrivateKey, remoteID d
|
|||
if err != nil {
|
||||
return s, err
|
||||
}
|
||||
authPacket, err := authMsg.sealPlain(h)
|
||||
var authPacket []byte
|
||||
if os.Getenv("RLPX_EIP8") != "" {
|
||||
authPacket, err = sealEIP8(authMsg, h)
|
||||
} else {
|
||||
authPacket, err = authMsg.sealPlain(h)
|
||||
}
|
||||
if err != nil {
|
||||
return s, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue