diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
commit | ba996f5e27572e853bcc5c815ae72082a15c9183 (patch) | |
tree | 16d6fd41d3d77208597683c71bdc9af603d43a77 /whisper/shhapi/api.go | |
parent | 64bf5bafe9ced66bfb11f34fed9181aa89399473 (diff) | |
download | go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.gz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.bz2 go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.lz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.xz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.zst go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.zip |
whisper: refactoring (#3411)
* whisper: refactored message processing
* whisper: final polishing
* whisper: logging updated
* whisper: moved the check, changed the default PoW
* whisper: refactoring of message queuing
* whisper: refactored parameters
Diffstat (limited to 'whisper/shhapi/api.go')
-rw-r--r-- | whisper/shhapi/api.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/whisper/shhapi/api.go b/whisper/shhapi/api.go index 6ed3e17c2..f2597e133 100644 --- a/whisper/shhapi/api.go +++ b/whisper/shhapi/api.go @@ -55,6 +55,22 @@ func APIs() []rpc.API { } } +// Start starts the Whisper worker threads. +func (api *PublicWhisperAPI) Start() error { + if api.whisper == nil { + return whisperOffLineErr + } + return api.whisper.Start(nil) +} + +// Stop stops the Whisper worker threads. +func (api *PublicWhisperAPI) Stop() error { + if api.whisper == nil { + return whisperOffLineErr + } + return api.whisper.Stop() +} + // Version returns the Whisper version this node offers. func (api *PublicWhisperAPI) Version() (*rpc.HexNumber, error) { if api.whisper == nil { |