aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv5/gen_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisperv5/gen_config.go')
-rw-r--r--whisper/whisperv5/gen_config.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/whisper/whisperv5/gen_config.go b/whisper/whisperv5/gen_config.go
new file mode 100644
index 000000000..2f10dcdb8
--- /dev/null
+++ b/whisper/whisperv5/gen_config.go
@@ -0,0 +1,32 @@
+// 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
+}