Commit 5f9b01a2 authored by Guillaume Ballet's avatar Guillaume Ballet Committed by Péter Szilágyi

whisper: only use the node id as a p2p id, not for sending messages (#16102)

This is in preparation for the switch to libp2p: the ID generated
will be from a private key created with the help of libp2p's crypto
library, while Whisper will still use Go's default crypto libraries
for encrypting its messages. This change removes a conflict.

It shouldn't have any impact as the person receiving emails is
the user, not the node.
parent fac6d9ce
...@@ -265,7 +265,7 @@ func initialize() { ...@@ -265,7 +265,7 @@ func initialize() {
Config: p2p.Config{ Config: p2p.Config{
PrivateKey: nodeid, PrivateKey: nodeid,
MaxPeers: maxPeers, MaxPeers: maxPeers,
Name: common.MakeName("wnode", "5.0"), Name: common.MakeName("wnode", "6.0"),
Protocols: shh.Protocols(), Protocols: shh.Protocols(),
ListenAddr: *argIP, ListenAddr: *argIP,
NAT: nat.Any(), NAT: nat.Any(),
...@@ -656,7 +656,7 @@ func requestExpiredMessagesLoop() { ...@@ -656,7 +656,7 @@ func requestExpiredMessagesLoop() {
params.PoW = *argServerPoW params.PoW = *argServerPoW
params.Payload = data params.Payload = data
params.KeySym = key params.KeySym = key
params.Src = nodeid params.Src = asymKey
params.WorkTime = 5 params.WorkTime = 5
msg, err := whisper.NewSentMessage(&params) msg, err := whisper.NewSentMessage(&params)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment