Skip to content

Commit cde02e0

Browse files
gluk256nonsense
authored andcommitted
swarm/pss: transition to whisper v6 (ethereum#19023)
1 parent 0c10d37 commit cde02e0

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

swarm/pss/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"github.com/ethereum/go-ethereum/swarm/network"
3939
"github.com/ethereum/go-ethereum/swarm/pss"
4040
"github.com/ethereum/go-ethereum/swarm/state"
41-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
41+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
4242
)
4343

4444
type protoCtrl struct {

swarm/pss/forwarding_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/ethereum/go-ethereum/p2p/protocols"
1313
"github.com/ethereum/go-ethereum/swarm/network"
1414
"github.com/ethereum/go-ethereum/swarm/pot"
15-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
15+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
1616
)
1717

1818
type testCase struct {

swarm/pss/notify/notify_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/ethereum/go-ethereum/swarm/network"
2020
"github.com/ethereum/go-ethereum/swarm/pss"
2121
"github.com/ethereum/go-ethereum/swarm/state"
22-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
22+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
2323
)
2424

2525
var (

swarm/pss/pss.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"github.com/ethereum/go-ethereum/swarm/network"
3939
"github.com/ethereum/go-ethereum/swarm/pot"
4040
"github.com/ethereum/go-ethereum/swarm/storage"
41-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
41+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
4242
"golang.org/x/crypto/sha3"
4343
)
4444

@@ -686,7 +686,7 @@ func (p *Pss) processSym(envelope *whisper.Envelope) (*whisper.ReceivedMessage,
686686
if err != nil {
687687
continue
688688
}
689-
if !recvmsg.Validate() {
689+
if !recvmsg.ValidateAndParse() {
690690
return nil, "", nil, fmt.Errorf("symmetrically encrypted message has invalid signature or is corrupt")
691691
}
692692
p.symKeyPoolMu.Lock()
@@ -713,7 +713,7 @@ func (p *Pss) processAsym(envelope *whisper.Envelope) (*whisper.ReceivedMessage,
713713
return nil, "", nil, fmt.Errorf("could not decrypt message: %s", err)
714714
}
715715
// check signature (if signed), strip padding
716-
if !recvmsg.Validate() {
716+
if !recvmsg.ValidateAndParse() {
717717
return nil, "", nil, fmt.Errorf("invalid message")
718718
}
719719
pubkeyid := common.ToHex(crypto.FromECDSAPub(recvmsg.Src))

swarm/pss/pss_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import (
5050
"github.com/ethereum/go-ethereum/swarm/network"
5151
"github.com/ethereum/go-ethereum/swarm/pot"
5252
"github.com/ethereum/go-ethereum/swarm/state"
53-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
53+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
5454
)
5555

5656
var (

swarm/pss/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/ethereum/go-ethereum/p2p"
2727
"github.com/ethereum/go-ethereum/rlp"
2828
"github.com/ethereum/go-ethereum/swarm/storage"
29-
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
29+
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
3030
)
3131

3232
const (

0 commit comments

Comments
 (0)