mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
whisper: fallback to default config if none is specified
This commit is contained in:
parent
3d66ba56ef
commit
b6b0e00198
1 changed files with 4 additions and 0 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue