aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv5/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisperv5/api.go')
-rw-r--r--whisper/whisperv5/api.go8
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 {