diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2017-02-24 01:46:32 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-02-24 01:46:32 +0800 |
commit | 11539030cdf91f5a74bf205e8f52f9f08aace8e3 (patch) | |
tree | 11ad7d946473f8a59cc512bdafcf81627b7993b5 /whisper/whisperv5/api.go | |
parent | 357732a8404c9fe4d02f041d20a0d05381a3e6d1 (diff) | |
download | dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar.gz dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar.bz2 dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar.lz dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar.xz dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.tar.zst dexon-11539030cdf91f5a74bf205e8f52f9f08aace8e3.zip |
whisper: expiry refactoring (#3706)
Diffstat (limited to 'whisper/whisperv5/api.go')
-rw-r--r-- | whisper/whisperv5/api.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/whisper/whisperv5/api.go b/whisper/whisperv5/api.go index d34213e05..9b43f7b70 100644 --- a/whisper/whisperv5/api.go +++ b/whisper/whisperv5/api.go @@ -64,6 +64,14 @@ func (api *PublicWhisperAPI) Version() (hexutil.Uint, error) { return hexutil.Uint(api.whisper.Version()), nil } +// Stats returns the Whisper statistics for diagnostics. +func (api *PublicWhisperAPI) Stats() (string, error) { + if api.whisper == nil { + return "", whisperOffLineErr + } + return api.whisper.Stats(), nil +} + // MarkPeerTrusted marks specific peer trusted, which will allow it // to send historic (expired) messages. func (api *PublicWhisperAPI) MarkPeerTrusted(peerID hexutil.Bytes) error { |