whisper: spellchecker update

This commit is contained in:
Vlad 2017-02-18 22:59:45 +01:00
parent d8caedcdf3
commit 2ac62c3857
3 changed files with 4 additions and 4 deletions

View file

@ -283,7 +283,7 @@ func (api *PublicWhisperAPI) Post(args PostArgs) error {
filter := api.whisper.GetFilter(args.FilterID) filter := api.whisper.GetFilter(args.FilterID)
if filter == nil && len(args.FilterID) > 0 { if filter == nil && len(args.FilterID) > 0 {
info := fmt.Sprintf("Post: wrong filter id %d", args.FilterID) info := fmt.Sprintf("Post: wrong filter id %s", args.FilterID)
glog.V(logger.Error).Infof(info) glog.V(logger.Error).Infof(info)
return errors.New(info) return errors.New(info)
} }
@ -299,7 +299,7 @@ func (api *PublicWhisperAPI) Post(args PostArgs) error {
if (params.Topic == TopicType{}) { if (params.Topic == TopicType{}) {
sz := len(filter.Topics) sz := len(filter.Topics)
if sz < 1 { if sz < 1 {
info := fmt.Sprintf("Post: no topics in filter # %d", args.FilterID) info := fmt.Sprintf("Post: no topics in filter # %s", args.FilterID)
glog.V(logger.Error).Infof(info) glog.V(logger.Error).Infof(info)
return errors.New(info) return errors.New(info)
} else if sz == 1 { } else if sz == 1 {

View file

@ -250,7 +250,7 @@ func TestUnmarshalPostArgs(t *testing.T) {
t.Fatalf("wrong pow: %f.", a.PoW) t.Fatalf("wrong pow: %f.", a.PoW)
} }
if a.FilterID != "test-filter-id" { if a.FilterID != "test-filter-id" {
t.Fatalf("wrong FilterID: %d.", a.FilterID) t.Fatalf("wrong FilterID: %s.", a.FilterID)
} }
if !bytes.Equal(a.PeerID[:], a.Topic[:]) { if !bytes.Equal(a.PeerID[:], a.Topic[:]) {
t.Fatalf("wrong PeerID: %x.", a.PeerID) t.Fatalf("wrong PeerID: %x.", a.PeerID)

View file

@ -187,7 +187,7 @@ func checkPropagation(t *testing.T) {
for i := 0; i < NumNodes; i++ { for i := 0; i < NumNodes; i++ {
f := nodes[i].shh.GetFilter(nodes[i].filerId) f := nodes[i].shh.GetFilter(nodes[i].filerId)
if f == nil { if f == nil {
t.Fatalf("failed to get filterId %d from node %d.", nodes[i].filerId, i) t.Fatalf("failed to get filterId %s from node %d.", nodes[i].filerId, i)
} }
mail := f.Retrieve() mail := f.Retrieve()