diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2017-06-21 16:24:34 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2017-06-21 16:24:34 +0800 |
commit | b6b0e0019810dd5fad992891c5db051b8603292d (patch) | |
tree | 592d4afe1e472b8732b167506ef01a9943076b9a /whisper | |
parent | 3d66ba56ef34e2b6a3a10c254506d8686adfff39 (diff) | |
download | dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar.gz dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar.bz2 dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar.lz dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar.xz dexon-b6b0e0019810dd5fad992891c5db051b8603292d.tar.zst dexon-b6b0e0019810dd5fad992891c5db051b8603292d.zip |
whisper: fallback to default config if none is specified
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/whisperv5/whisper.go | 4 |
1 files changed, 4 insertions, 0 deletions
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), |