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/whisperv5/whisper.go | |
parent | 3d66ba56ef34e2b6a3a10c254506d8686adfff39 (diff) | |
download | go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar.gz go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar.bz2 go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar.lz go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar.xz go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.tar.zst go-tangerine-b6b0e0019810dd5fad992891c5db051b8603292d.zip |
whisper: fallback to default config if none is specified
Diffstat (limited to 'whisper/whisperv5/whisper.go')
-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), |