Rename Topic to Topics

This commit is contained in:
Taylor Gerring 2015-03-11 10:56:44 -05:00
parent 9e89c803f1
commit 90f34ed40a
3 changed files with 7 additions and 7 deletions

View File

@ -400,7 +400,7 @@ func (self *EthereumApi) MessagesChanged(id int, reply *interface{}) error {
} }
func (p *EthereumApi) WhisperPost(args *WhisperMessageArgs, reply *interface{}) error { func (p *EthereumApi) WhisperPost(args *WhisperMessageArgs, reply *interface{}) error {
err := p.xeth().Whisper().Post(args.Payload, args.To, args.From, args.Topic, args.Priority, args.Ttl) err := p.xeth().Whisper().Post(args.Payload, args.To, args.From, args.Topics, args.Priority, args.Ttl)
if err != nil { if err != nil {
return err return err
} }

View File

@ -367,7 +367,7 @@ type WhisperMessageArgs struct {
Payload string Payload string
To string To string
From string From string
Topic []string Topics []string
Priority uint32 Priority uint32
Ttl uint32 Ttl uint32
} }
@ -377,7 +377,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
Payload string Payload string
To string To string
From string From string
Topic []string Topics []string
Priority string Priority string
Ttl string Ttl string
} }
@ -392,7 +392,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
args.Payload = obj[0].Payload args.Payload = obj[0].Payload
args.To = obj[0].To args.To = obj[0].To
args.From = obj[0].From args.From = obj[0].From
args.Topic = obj[0].Topic args.Topics = obj[0].Topics
args.Priority = uint32(ethutil.Big(obj[0].Priority).Int64()) args.Priority = uint32(ethutil.Big(obj[0].Priority).Int64())
args.Ttl = uint32(ethutil.Big(obj[0].Ttl).Int64()) args.Ttl = uint32(ethutil.Big(obj[0].Ttl).Int64())

View File

@ -270,7 +270,7 @@ func TestFilterOptions(t *testing.T) {
t.Errorf("Address shoud be %#v but is %#v", expected.Address, args.Address) t.Errorf("Address shoud be %#v but is %#v", expected.Address, args.Address)
} }
// if expected.Topic != args.Topic { // if expected.Topics != args.Topics {
// t.Errorf("Topic shoud be %#v but is %#v", expected.Topic, args.Topic) // t.Errorf("Topic shoud be %#v but is %#v", expected.Topic, args.Topic)
// } // }
} }
@ -316,7 +316,7 @@ func TestWhisperMessageArgs(t *testing.T) {
expected.Payload = "0x68656c6c6f20776f726c64" expected.Payload = "0x68656c6c6f20776f726c64"
expected.Priority = 100 expected.Priority = 100
expected.Ttl = 100 expected.Ttl = 100
expected.Topic = []string{"0x68656c6c6f20776f726c64"} expected.Topics = []string{"0x68656c6c6f20776f726c64"}
args := new(WhisperMessageArgs) args := new(WhisperMessageArgs)
if err := json.Unmarshal([]byte(input), &args); err != nil { if err := json.Unmarshal([]byte(input), &args); err != nil {
@ -343,7 +343,7 @@ func TestWhisperMessageArgs(t *testing.T) {
t.Errorf("Priority shoud be %#v but is %#v", expected.Priority, args.Priority) t.Errorf("Priority shoud be %#v but is %#v", expected.Priority, args.Priority)
} }
// if expected.Topic != args.Topic { // if expected.Topics != args.Topics {
// t.Errorf("Topic shoud be %#v but is %#v", expected.Topic, args.Topic) // t.Errorf("Topic shoud be %#v but is %#v", expected.Topic, args.Topic)
// } // }
} }