diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2017-06-21 16:11:35 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2017-06-21 16:11:54 +0800 |
commit | 767dc6c73d652731198d96c68ea0e1d00bf8842d (patch) | |
tree | bfeae235dfc706c08e8fd0652bf3702871af2836 /whisper/whisperv5 | |
parent | 36e7963467eb2eb3cceff9fe1960db17a388e458 (diff) | |
download | go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar.gz go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar.bz2 go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar.lz go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar.xz go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.tar.zst go-tangerine-767dc6c73d652731198d96c68ea0e1d00bf8842d.zip |
whisper: remove gencodec override for config
Diffstat (limited to 'whisper/whisperv5')
-rw-r--r-- | whisper/whisperv5/config.go | 2 | ||||
-rw-r--r-- | whisper/whisperv5/gen_config.go | 32 |
2 files changed, 0 insertions, 34 deletions
diff --git a/whisper/whisperv5/config.go b/whisper/whisperv5/config.go index a53d50448..af59f1bdc 100644 --- a/whisper/whisperv5/config.go +++ b/whisper/whisperv5/config.go @@ -20,8 +20,6 @@ import ( "gopkg.in/urfave/cli.v1" ) -//go:generate gencodec -type Config -formats toml -out gen_config.go - type Config struct { MaxMessageSize uint32 `toml:",omitempty"` MinimumAcceptedPOW float64 `toml:",omitempty"` diff --git a/whisper/whisperv5/gen_config.go b/whisper/whisperv5/gen_config.go deleted file mode 100644 index 2f10dcdb8..000000000 --- a/whisper/whisperv5/gen_config.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by github.com/fjl/gencodec. DO NOT EDIT. - -package whisperv5 - -func (c Config) MarshalTOML() (interface{}, error) { - type Config struct { - MaxMessageSize uint32 `toml:",omitempty"` - MinimumAcceptedPOW float64 `toml:",omitempty"` - } - var enc Config - enc.MaxMessageSize = c.MaxMessageSize - enc.MinimumAcceptedPOW = c.MinimumAcceptedPOW - return &enc, nil -} - -func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { - type Config struct { - MaxMessageSize *uint32 `toml:",omitempty"` - MinimumAcceptedPOW *float64 `toml:",omitempty"` - } - var dec Config - if err := unmarshal(&dec); err != nil { - return err - } - if dec.MaxMessageSize != nil { - c.MaxMessageSize = *dec.MaxMessageSize - } - if dec.MinimumAcceptedPOW != nil { - c.MinimumAcceptedPOW = *dec.MinimumAcceptedPOW - } - return nil -} |