Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
90f34ed4
Commit
90f34ed4
authored
Mar 11, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Topic to Topics
parent
9e89c803
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
api.go
rpc/api.go
+1
-1
args.go
rpc/args.go
+3
-3
args_test.go
rpc/args_test.go
+3
-3
No files found.
rpc/api.go
View file @
90f34ed4
...
@@ -400,7 +400,7 @@ func (self *EthereumApi) MessagesChanged(id int, reply *interface{}) error {
...
@@ -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
.
Topic
s
,
args
.
Priority
,
args
.
Ttl
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
rpc/args.go
View file @
90f34ed4
...
@@ -367,7 +367,7 @@ type WhisperMessageArgs struct {
...
@@ -367,7 +367,7 @@ type WhisperMessageArgs struct {
Payload
string
Payload
string
To
string
To
string
From
string
From
string
Topic
[]
string
Topic
s
[]
string
Priority
uint32
Priority
uint32
Ttl
uint32
Ttl
uint32
}
}
...
@@ -377,7 +377,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
...
@@ -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
Topic
s
[]
string
Priority
string
Priority
string
Ttl
string
Ttl
string
}
}
...
@@ -392,7 +392,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
...
@@ -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
.
Topic
s
=
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
())
...
...
rpc/args_test.go
View file @
90f34ed4
...
@@ -270,7 +270,7 @@ func TestFilterOptions(t *testing.T) {
...
@@ -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.Topic
s != 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) {
...
@@ -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
.
Topic
s
=
[]
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) {
...
@@ -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.Topic
s != 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)
// }
// }
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment