This commit is contained in:
cuiweixie 2026-01-10 11:11:40 +08:00
parent f506aa1c27
commit 101eed8a93
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ import (
) )
// MarshalTOML marshals as TOML. // MarshalTOML marshals as TOML.
func (c Config) MarshalTOML() (any, error) { func (c Config) MarshalTOML() (interface{}, error) {
type Config struct { type Config struct {
Genesis *core.Genesis `toml:",omitempty"` Genesis *core.Genesis `toml:",omitempty"`
NetworkId uint64 NetworkId uint64
@ -119,7 +119,7 @@ func (c Config) MarshalTOML() (any, error) {
} }
// UnmarshalTOML unmarshals from TOML. // UnmarshalTOML unmarshals from TOML.
func (c *Config) UnmarshalTOML(unmarshal func(any) error) error { func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
type Config struct { type Config struct {
Genesis *core.Genesis `toml:",omitempty"` Genesis *core.Genesis `toml:",omitempty"`
NetworkId *uint64 NetworkId *uint64

View file

@ -14,7 +14,7 @@ import (
var _ = (*configMarshaling)(nil) var _ = (*configMarshaling)(nil)
// MarshalTOML marshals as TOML. // MarshalTOML marshals as TOML.
func (c Config) MarshalTOML() (any, error) { func (c Config) MarshalTOML() (interface{}, error) {
type Config struct { type Config struct {
PrivateKey *ecdsa.PrivateKey `toml:"-"` PrivateKey *ecdsa.PrivateKey `toml:"-"`
MaxPeers int MaxPeers int
@ -66,7 +66,7 @@ func (c Config) MarshalTOML() (any, error) {
} }
// UnmarshalTOML unmarshals from TOML. // UnmarshalTOML unmarshals from TOML.
func (c *Config) UnmarshalTOML(unmarshal func(any) error) error { func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
type Config struct { type Config struct {
PrivateKey *ecdsa.PrivateKey `toml:"-"` PrivateKey *ecdsa.PrivateKey `toml:"-"`
MaxPeers *int MaxPeers *int