Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/whisper/whisperv5/gen_config.go

32 lines
828 B

// 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
}