pass the correct config

pull/4510/head
Diego Nava 1 year ago
parent 68cb005dc3
commit ff86c5734b
No known key found for this signature in database
GPG Key ID: 61AFC8738DA8B8B1
  1. 13
      core/state_processor.go

@ -57,10 +57,9 @@ const (
//
// StateProcessor implements Processor.
type StateProcessor struct {
config *params.ChainConfig // Chain configuration options
bc BlockChain // Canonical blockchain
beacon BlockChain // Beacon chain
resultCache *lru.Cache // Cache for result after a certain block is processed
bc BlockChain // Canonical blockchain
beacon BlockChain // Beacon chain
resultCache *lru.Cache // Cache for result after a certain block is processed
}
// this structure is cached, and each individual element is returned
@ -135,9 +134,7 @@ func (p *StateProcessor) Process(
}
processTxsAndStxs := true
cxReceipt, err := MayBalanceMigration(
gp, header, statedb, p.bc, p.config,
)
cxReceipt, err := MayBalanceMigration(gp, header, statedb, p.bc)
if err != nil {
if errors.Is(err, ErrNoMigrationPossible) {
// ran out of accounts
@ -534,8 +531,8 @@ func MayBalanceMigration(
header *block.Header,
db *state.DB,
chain BlockChain,
config *params.ChainConfig,
) (*types.CXReceipt, error) {
config := chain.Config()
isMainnet := nodeconfig.GetDefaultConfig().GetNetworkType() == nodeconfig.Mainnet
if isMainnet {
if config.IsOneEpochBeforeHIP30(header.Epoch()) {

Loading…
Cancel
Save