fix: config: Fix eth rpc typo (#10076)

This commit is contained in:
Łukasz Magiera 2023-01-19 21:35:19 +01:00 committed by GitHub
parent 196b41d5f6
commit eaccb571a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 14 deletions

View File

@ -344,11 +344,11 @@
[Fevm]
# EnableEthPRC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
# EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
#
# type: bool
# env var: LOTUS_FEVM_ENABLEETHPRC
#EnableEthPRC = false
# env var: LOTUS_FEVM_ENABLEETHRPC
#EnableEthRPC = false
# EthTxHashMappingLifetimeDays the transaction hash lookup database will delete mappings that have been stored for more than x days
# Set to 0 to keep all mappings

View File

@ -137,5 +137,5 @@ func TestEVMRpcDisable(t *testing.T) {
client, _, _ := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC(), kit.DisableEthRPC())
_, err := client.EthBlockNumber(context.Background())
require.ErrorContains(t, err, "module disabled, enable with Fevm.EnableEthPRC")
require.ErrorContains(t, err, "module disabled, enable with Fevm.EnableEthRPC")
}

View File

@ -62,7 +62,7 @@ var DefaultNodeOpts = nodeOpts{
func(cfg *config.FullNode) error {
// test defaults
cfg.Fevm.EnableEthPRC = true
cfg.Fevm.EnableEthRPC = true
return nil
},
},
@ -308,7 +308,7 @@ func HistoricFilterAPI(dbpath string) NodeOpt {
func DisableEthRPC() NodeOpt {
return WithCfgOpt(func(cfg *config.FullNode) error {
cfg.Fevm.EnableEthPRC = false
cfg.Fevm.EnableEthRPC = false
return nil
})
}

View File

@ -261,8 +261,8 @@ func ConfigFullNode(c interface{}) Option {
// in lite-mode Eth event api is provided by gateway
ApplyIf(isFullNode, Override(new(full.EthEventAPI), modules.EthEventAPI(cfg.ActorEvent))),
If(cfg.Fevm.EnableEthPRC, Override(new(full.EthModuleAPI), modules.EthModuleAPI(cfg.Fevm))),
If(!cfg.Fevm.EnableEthPRC, Override(new(full.EthModuleAPI), &full.EthModuleDummy{})),
If(cfg.Fevm.EnableEthRPC, Override(new(full.EthModuleAPI), modules.EthModuleAPI(cfg.Fevm))),
If(!cfg.Fevm.EnableEthRPC, Override(new(full.EthModuleAPI), &full.EthModuleDummy{})),
)
}

View File

@ -108,7 +108,7 @@ func DefaultFullNode() *FullNode {
MaxFilterHeightRange: 2880, // conservative limit of one day
},
Fevm: FevmConfig{
EnableEthPRC: false,
EnableEthRPC: false,
EthTxHashMappingLifetimeDays: 0,
},
}

View File

@ -401,10 +401,10 @@ see https://lotus.filecoin.io/storage-providers/advanced-configurations/market/#
},
"FevmConfig": []DocField{
{
Name: "EnableEthPRC",
Name: "EnableEthRPC",
Type: "bool",
Comment: `EnableEthPRC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.`,
Comment: `EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.`,
},
{
Name: "EthTxHashMappingLifetimeDays",

View File

@ -695,8 +695,8 @@ type ActorEventConfig struct {
}
type FevmConfig struct {
// EnableEthPRC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
EnableEthPRC bool
// EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
EnableEthRPC bool
// EthTxHashMappingLifetimeDays the transaction hash lookup database will delete mappings that have been stored for more than x days
// Set to 0 to keep all mappings

View File

@ -10,7 +10,7 @@ import (
"github.com/filecoin-project/lotus/chain/types/ethtypes"
)
var ErrModuleDisabled = errors.New("module disabled, enable with Fevm.EnableEthPRC / LOTUS_FEVM_ENABLEETHPRC")
var ErrModuleDisabled = errors.New("module disabled, enable with Fevm.EnableEthRPC / LOTUS_FEVM_ENABLEETHPRC")
type EthModuleDummy struct{}