diff options
Diffstat (limited to 'whisper/shhapi')
-rw-r--r-- | whisper/shhapi/api.go | 6 | ||||
-rw-r--r-- | whisper/shhapi/api_test.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/whisper/shhapi/api.go b/whisper/shhapi/api.go index 8a0bd9214..24d54b653 100644 --- a/whisper/shhapi/api.go +++ b/whisper/shhapi/api.go @@ -73,11 +73,11 @@ func (api *PublicWhisperAPI) Stop() error { } // Version returns the Whisper version this node offers. -func (api *PublicWhisperAPI) Version() (*rpc.HexNumber, error) { +func (api *PublicWhisperAPI) Version() (hexutil.Uint, error) { if api.whisper == nil { - return rpc.NewHexNumber(0), whisperOffLineErr + return 0, whisperOffLineErr } - return rpc.NewHexNumber(api.whisper.Version()), nil + return hexutil.Uint(api.whisper.Version()), nil } // MarkPeerTrusted marks specific peer trusted, which will allow it diff --git a/whisper/shhapi/api_test.go b/whisper/shhapi/api_test.go index a10e2e476..d2890a9a3 100644 --- a/whisper/shhapi/api_test.go +++ b/whisper/shhapi/api_test.go @@ -39,8 +39,8 @@ func TestBasic(t *testing.T) { t.Fatalf("failed generateFilter: %s.", err) } - if ver.Uint64() != whisperv5.ProtocolVersion { - t.Fatalf("wrong version: %d.", ver.Uint64()) + if uint64(ver) != whisperv5.ProtocolVersion { + t.Fatalf("wrong version: %d.", ver) } mail := api.GetFilterChanges(1) |