aboutsummaryrefslogtreecommitdiffstats
path: root/whisper
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-12-12 19:25:59 +0800
committerFelix Lange <fjl@twurst.com>2016-12-20 21:35:26 +0800
commitadab2e16bdf24c2eaf498722187fb36c04a5376b (patch)
treef8bb3dd6aee1a79235202c86be2f8502bf293785 /whisper
parenta3e3235d97cd85e13609f61a9268ad06aa9843c2 (diff)
downloaddexon-adab2e16bdf24c2eaf498722187fb36c04a5376b.tar.gz
dexon-adab2e16bdf24c2eaf498722187fb36c04a5376b.tar.zst
dexon-adab2e16bdf24c2eaf498722187fb36c04a5376b.zip
rpc: remove HexBytes, replace all uses with hexutil.Bytes
Diffstat (limited to 'whisper')
-rw-r--r--whisper/shhapi/api.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/whisper/shhapi/api.go b/whisper/shhapi/api.go
index f2597e133..8a0bd9214 100644
--- a/whisper/shhapi/api.go
+++ b/whisper/shhapi/api.go
@@ -23,6 +23,7 @@ import (
mathrand "math/rand"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
@@ -81,7 +82,7 @@ func (api *PublicWhisperAPI) Version() (*rpc.HexNumber, error) {
// MarkPeerTrusted marks specific peer trusted, which will allow it
// to send historic (expired) messages.
-func (api *PublicWhisperAPI) MarkPeerTrusted(peerID rpc.HexBytes) error {
+func (api *PublicWhisperAPI) MarkPeerTrusted(peerID hexutil.Bytes) error {
if api.whisper == nil {
return whisperOffLineErr
}
@@ -92,7 +93,7 @@ func (api *PublicWhisperAPI) MarkPeerTrusted(peerID rpc.HexBytes) error {
// data contains parameters (time frame, payment details, etc.), required
// by the remote email-like server. Whisper is not aware about the data format,
// it will just forward the raw data to the server.
-func (api *PublicWhisperAPI) RequestHistoricMessages(peerID rpc.HexBytes, data rpc.HexBytes) error {
+func (api *PublicWhisperAPI) RequestHistoricMessages(peerID hexutil.Bytes, data hexutil.Bytes) error {
if api.whisper == nil {
return whisperOffLineErr
}
@@ -388,12 +389,12 @@ type PostArgs struct {
To string `json:"to"`
KeyName string `json:"keyname"`
Topic whisperv5.TopicType `json:"topic"`
- Padding rpc.HexBytes `json:"padding"`
- Payload rpc.HexBytes `json:"payload"`
+ Padding hexutil.Bytes `json:"padding"`
+ Payload hexutil.Bytes `json:"payload"`
WorkTime uint32 `json:"worktime"`
PoW float64 `json:"pow"`
FilterID uint32 `json:"filterID"`
- PeerID rpc.HexBytes `json:"peerID"`
+ PeerID hexutil.Bytes `json:"peerID"`
}
type WhisperFilterArgs struct {