good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
3d013c19
Commit
3d013c19
authored
7 years ago
by
Guillaume Ballet
Browse files
Options
Downloads
Patches
Plain Diff
whisper: some components are still using v5, switch to v6
parent
933972d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmd/geth/config.go
+1
-1
1 addition, 1 deletion
cmd/geth/config.go
cmd/utils/flags.go
+1
-1
1 addition, 1 deletion
cmd/utils/flags.go
mobile/geth.go
+1
-1
1 addition, 1 deletion
mobile/geth.go
whisper/shhclient/client.go
+10
-10
10 additions, 10 deletions
whisper/shhclient/client.go
with
13 additions
and
13 deletions
cmd/geth/config.go
+
1
−
1
View file @
3d013c19
...
...
@@ -32,7 +32,7 @@ import (
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
5
"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
6
"
"github.com/naoina/toml"
)
...
...
This diff is collapsed.
Click to expand it.
cmd/utils/flags.go
+
1
−
1
View file @
3d013c19
...
...
@@ -55,7 +55,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/p2p/netutil"
"github.com/ethereum/go-ethereum/params"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
5
"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
6
"
"gopkg.in/urfave/cli.v1"
)
...
...
This diff is collapsed.
Click to expand it.
mobile/geth.go
+
1
−
1
View file @
3d013c19
...
...
@@ -34,7 +34,7 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/params"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
5
"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
6
"
)
// NodeConfig represents the collection of configuration values to fine tune the Geth
...
...
This diff is collapsed.
Click to expand it.
whisper/shhclient/client.go
+
10
−
10
View file @
3d013c19
...
...
@@ -22,10 +22,10 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/rpc"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
5
"
whisper
"github.com/ethereum/go-ethereum/whisper/whisperv
6
"
)
// Client defines typed wrappers for the Whisper v
5
RPC API.
// Client defines typed wrappers for the Whisper v
6
RPC API.
type
Client
struct
{
c
*
rpc
.
Client
}
...
...
@@ -168,27 +168,27 @@ func (sc *Client) Post(ctx context.Context, message whisper.NewMessage) error {
// SubscribeMessages subscribes to messages that match the given criteria. This method
// is only supported on bi-directional connections such as websockets and IPC.
// NewMessageFilter uses polling and is supported over HTTP.
func
(
e
c
*
Client
)
SubscribeMessages
(
ctx
context
.
Context
,
criteria
whisper
.
Criteria
,
ch
chan
<-
*
whisper
.
Message
)
(
ethereum
.
Subscription
,
error
)
{
return
e
c
.
c
.
ShhSubscribe
(
ctx
,
ch
,
"messages"
,
criteria
)
func
(
s
c
*
Client
)
SubscribeMessages
(
ctx
context
.
Context
,
criteria
whisper
.
Criteria
,
ch
chan
<-
*
whisper
.
Message
)
(
ethereum
.
Subscription
,
error
)
{
return
s
c
.
c
.
ShhSubscribe
(
ctx
,
ch
,
"messages"
,
criteria
)
}
// NewMessageFilter creates a filter within the node. This filter can be used to poll
// for new messages (see FilterMessages) that satisfy the given criteria. A filter can
// timeout when it was polled for in whisper.filterTimeout.
func
(
e
c
*
Client
)
NewMessageFilter
(
ctx
context
.
Context
,
criteria
whisper
.
Criteria
)
(
string
,
error
)
{
func
(
s
c
*
Client
)
NewMessageFilter
(
ctx
context
.
Context
,
criteria
whisper
.
Criteria
)
(
string
,
error
)
{
var
id
string
return
id
,
e
c
.
c
.
CallContext
(
ctx
,
&
id
,
"shh_newMessageFilter"
,
criteria
)
return
id
,
s
c
.
c
.
CallContext
(
ctx
,
&
id
,
"shh_newMessageFilter"
,
criteria
)
}
// DeleteMessageFilter removes the filter associated with the given id.
func
(
e
c
*
Client
)
DeleteMessageFilter
(
ctx
context
.
Context
,
id
string
)
error
{
func
(
s
c
*
Client
)
DeleteMessageFilter
(
ctx
context
.
Context
,
id
string
)
error
{
var
ignored
bool
return
e
c
.
c
.
CallContext
(
ctx
,
&
ignored
,
"shh_deleteMessageFilter"
,
id
)
return
s
c
.
c
.
CallContext
(
ctx
,
&
ignored
,
"shh_deleteMessageFilter"
,
id
)
}
// FilterMessages retrieves all messages that are received between the last call to
// this function and match the criteria that where given when the filter was created.
func
(
e
c
*
Client
)
FilterMessages
(
ctx
context
.
Context
,
id
string
)
([]
*
whisper
.
Message
,
error
)
{
func
(
s
c
*
Client
)
FilterMessages
(
ctx
context
.
Context
,
id
string
)
([]
*
whisper
.
Message
,
error
)
{
var
messages
[]
*
whisper
.
Message
return
messages
,
e
c
.
c
.
CallContext
(
ctx
,
&
messages
,
"shh_getFilterMessages"
,
id
)
return
messages
,
s
c
.
c
.
CallContext
(
ctx
,
&
messages
,
"shh_getFilterMessages"
,
id
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment