Merge pull request #14540 from bas-vk/whisper-api

whisperv5: integrate whisper and implement API
This commit is contained in:
Péter Szilágyi
2017-06-26 13:44:35 +03:00
committed by GitHub
31 changed files with 1704 additions and 1257 deletions

View File

@ -169,7 +169,9 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
}
// Register the Whisper protocol if requested
if config.WhisperEnabled {
if err := rawStack.Register(func(*node.ServiceContext) (node.Service, error) { return whisper.New(), nil }); err != nil {
if err := rawStack.Register(func(*node.ServiceContext) (node.Service, error) {
return whisper.New(&whisper.DefaultConfig), nil
}); err != nil {
return nil, fmt.Errorf("whisper init: %v", err)
}
}