Commit b6b0e001 authored by Bas van Kervel's avatar Bas van Kervel

whisper: fallback to default config if none is specified

parent 3d66ba56
...@@ -109,6 +109,10 @@ type Whisper struct { ...@@ -109,6 +109,10 @@ type Whisper struct {
// New creates a Whisper client ready to communicate through the Ethereum P2P network. // New creates a Whisper client ready to communicate through the Ethereum P2P network.
func New(cfg *Config) *Whisper { func New(cfg *Config) *Whisper {
if cfg == nil {
cfg = &DefaultConfig
}
whisper := &Whisper{ whisper := &Whisper{
privateKeys: make(map[string]*ecdsa.PrivateKey), privateKeys: make(map[string]*ecdsa.PrivateKey),
symKeys: make(map[string][]byte), symKeys: make(map[string][]byte),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment