aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Ballet <gballet@gmail.com>2018-03-26 22:36:14 +0800
committerGitHub <noreply@github.com>2018-03-26 22:36:14 +0800
commitcf799e5eaad022a07ca74b765451c8772d0d783c (patch)
treedc34d5d897bf730359b2c6016262a766fe85ac7c
parentc053f1146d777fef4e481f493946957d447b89d0 (diff)
parent3d013c193942aad9820361795cf3a17bb99470b1 (diff)
downloaddexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar.gz
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar.bz2
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar.lz
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar.xz
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.tar.zst
dexon-cf799e5eaad022a07ca74b765451c8772d0d783c.zip
whisper: switch all remaining components from v5 to v6
-rw-r--r--cmd/geth/config.go2
-rw-r--r--cmd/utils/flags.go2
-rw-r--r--mobile/geth.go2
-rw-r--r--whisper/shhclient/client.go20
4 files changed, 13 insertions, 13 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index 50e4de2e7..e6bd4d5be 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -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/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"github.com/naoina/toml"
)
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index ff78a0fcc..4f3d81f5d 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -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/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"gopkg.in/urfave/cli.v1"
)
diff --git a/mobile/geth.go b/mobile/geth.go
index 7e3b8f491..488a4150f 100644
--- a/mobile/geth.go
+++ b/mobile/geth.go
@@ -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/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
// NodeConfig represents the collection of configuration values to fine tune the Geth
diff --git a/whisper/shhclient/client.go b/whisper/shhclient/client.go
index 61b4775d9..bbe694baa 100644
--- a/whisper/shhclient/client.go
+++ b/whisper/shhclient/client.go
@@ -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/whisperv5"
+ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
)
-// Client defines typed wrappers for the Whisper v5 RPC API.
+// Client defines typed wrappers for the Whisper v6 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 (ec *Client) SubscribeMessages(ctx context.Context, criteria whisper.Criteria, ch chan<- *whisper.Message) (ethereum.Subscription, error) {
- return ec.c.ShhSubscribe(ctx, ch, "messages", criteria)
+func (sc *Client) SubscribeMessages(ctx context.Context, criteria whisper.Criteria, ch chan<- *whisper.Message) (ethereum.Subscription, error) {
+ return sc.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 (ec *Client) NewMessageFilter(ctx context.Context, criteria whisper.Criteria) (string, error) {
+func (sc *Client) NewMessageFilter(ctx context.Context, criteria whisper.Criteria) (string, error) {
var id string
- return id, ec.c.CallContext(ctx, &id, "shh_newMessageFilter", criteria)
+ return id, sc.c.CallContext(ctx, &id, "shh_newMessageFilter", criteria)
}
// DeleteMessageFilter removes the filter associated with the given id.
-func (ec *Client) DeleteMessageFilter(ctx context.Context, id string) error {
+func (sc *Client) DeleteMessageFilter(ctx context.Context, id string) error {
var ignored bool
- return ec.c.CallContext(ctx, &ignored, "shh_deleteMessageFilter", id)
+ return sc.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 (ec *Client) FilterMessages(ctx context.Context, id string) ([]*whisper.Message, error) {
+func (sc *Client) FilterMessages(ctx context.Context, id string) ([]*whisper.Message, error) {
var messages []*whisper.Message
- return messages, ec.c.CallContext(ctx, &messages, "shh_getFilterMessages", id)
+ return messages, sc.c.CallContext(ctx, &messages, "shh_getFilterMessages", id)
}