Skip to content

Commit a4b59ee

Browse files
committed
core,eth/feemarket: rename feemarket.GetActiveConfig for clarity
1 parent 6a24985 commit a4b59ee

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

core/state_transition.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
486486
// TODO: check for our built-in precompiles
487487

488488
// Get configuration from fee market
489-
config, found := fm.GetConfig(eventLog.Address, st.state)
490-
if !found || !config.IsActive {
489+
config, found := fm.GetActiveConfig(eventLog.Address, st.state)
490+
if !found {
491491
continue
492492
}
493493

eth/feemarket/feemarket.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func (fm *FeeMarket) GetConstants(state StateReader) types.FeeMarketConstants {
5656
}
5757
}
5858

59-
// GetConfig returns configuration for a specific address
60-
func (fm *FeeMarket) GetConfig(address common.Address, state StateReader) (config types.FeeMarketConfig, found bool) {
59+
// GetActiveConfig returns configuration for a specific address
60+
func (fm *FeeMarket) GetActiveConfig(address common.Address, state StateReader) (config types.FeeMarketConfig, found bool) {
6161
if state == nil {
6262
return types.FeeMarketConfig{}, false
6363
}

eth/feemarket/feemarket_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -376,20 +376,20 @@ func TestStorageLayoutParsing(t *testing.T) {
376376
}
377377

378378
contractAddr1 := common.HexToAddress("0x96c4a1421b494e0cf1bb1e41911ec3251df94223")
379-
if _, found := fm.GetConfig(contractAddr1, stateDB); !found {
379+
if _, found := fm.GetActiveConfig(contractAddr1, stateDB); !found {
380380
t.Errorf("Config not found for address %s", contractAddr1.Hex())
381381
}
382382

383383
contractAddr2 := common.HexToAddress("0x13261a11f2C6c6318240818de0Ddc3DB70a1B3bF")
384-
if _, found := fm.GetConfig(contractAddr2, stateDB); !found {
384+
if _, found := fm.GetActiveConfig(contractAddr2, stateDB); !found {
385385
t.Errorf("Config not found for address %s", contractAddr2.Hex())
386386
}
387387
// Write generated config
388388
testAddr := common.HexToAddress("0x1234")
389389
genConfig1 := writeRandomConfiguration(storage, testAddr, constants)
390390

391391
// Verify generated config can be read correctly
392-
config, found := fm.GetConfig(testAddr, stateDB)
392+
config, found := fm.GetActiveConfig(testAddr, stateDB)
393393
if !found {
394394
t.Fatal("Generated config not found")
395395
}

0 commit comments

Comments
 (0)