From b6b0e0019810dd5fad992891c5db051b8603292d Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Wed, 21 Jun 2017 10:24:34 +0200 Subject: [PATCH] whisper: fallback to default config if none is specified --- whisper/whisperv5/whisper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whisper/whisperv5/whisper.go b/whisper/whisperv5/whisper.go index cc6c65a9f..83a408dfc 100644 --- a/whisper/whisperv5/whisper.go +++ b/whisper/whisperv5/whisper.go @@ -109,6 +109,10 @@ type Whisper struct { // New creates a Whisper client ready to communicate through the Ethereum P2P network. func New(cfg *Config) *Whisper { + if cfg == nil { + cfg = &DefaultConfig + } + whisper := &Whisper{ privateKeys: make(map[string]*ecdsa.PrivateKey), symKeys: make(map[string][]byte),