Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Commit c35aa32

Browse files
vmaarkgbalint
authored andcommitted
make topic readable in error messages (#540)
1 parent 374e767 commit c35aa32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

swarm/pss/pss.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,9 @@ func (self *Pss) SendSym(symkeyid string, topic Topic, msg []byte) error {
677677
psp, ok := self.symKeyPool[symkeyid][topic]
678678
self.symKeyPoolMu.Unlock()
679679
if !ok {
680-
return fmt.Errorf("invalid topic '%s' for symkey '%s'", topic, symkeyid)
680+
return fmt.Errorf("invalid topic '%s' for symkey '%s'", topic.String(), symkeyid)
681681
} else if psp.address == nil {
682-
return fmt.Errorf("no address hint for topic '%s' symkey '%s'", topic, symkeyid)
682+
return fmt.Errorf("no address hint for topic '%s' symkey '%s'", topic.String(), symkeyid)
683683
}
684684
err = self.send(*psp.address, topic, msg, false, symkey)
685685
return err
@@ -697,9 +697,9 @@ func (self *Pss) SendAsym(pubkeyid string, topic Topic, msg []byte) error {
697697
psp, ok := self.pubKeyPool[pubkeyid][topic]
698698
self.pubKeyPoolMu.Unlock()
699699
if !ok {
700-
return fmt.Errorf("invalid topic '%s' for pubkey '%s'", topic, pubkeyid)
700+
return fmt.Errorf("invalid topic '%s' for pubkey '%s'", topic.String(), pubkeyid)
701701
} else if psp.address == nil {
702-
return fmt.Errorf("no address hint for topic '%s' pubkey '%s'", topic, pubkeyid)
702+
return fmt.Errorf("no address hint for topic '%s' pubkey '%s'", topic.String(), pubkeyid)
703703
}
704704
go func() {
705705
self.send(*psp.address, topic, msg, true, common.FromHex(pubkeyid))

0 commit comments

Comments
 (0)