Skip to content

Commit

Permalink
Fix after self-review.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Nov 12, 2024
1 parent 22026c6 commit 5f8d03f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
7 changes: 0 additions & 7 deletions dataRetriever/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/multiversx/mx-chain-go/p2p"
"github.com/multiversx/mx-chain-go/state"
"github.com/multiversx/mx-chain-go/storage"
vmcommon "github.com/multiversx/mx-chain-vm-common-go"
)

// ResolverThrottler can monitor the number of the currently running resolver go routines
Expand Down Expand Up @@ -360,12 +359,6 @@ type PeerAuthenticationPayloadValidator interface {
IsInterfaceNil() bool
}

// EpochNotifier can notify upon an epoch change
type EpochNotifier interface {
RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)
IsInterfaceNil() bool
}

// AccountNonceProvider defines the behavior of a component able to provide the nonce for an account
type AccountNonceProvider interface {
GetAccountNonce(accountKey []byte) (uint64, error)
Expand Down
10 changes: 4 additions & 6 deletions factory/processing/blockProcessorCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ func (pcf *processComponentsFactory) newShardBlockProcessor(
BadTxForwarder: badTxInterim,
EnableRoundsHandler: pcf.coreData.EnableRoundsHandler(),
EnableEpochsHandler: pcf.coreData.EnableEpochsHandler(),
// TODO: is this correct?
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: wasmVMChangeLocker,
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: wasmVMChangeLocker,
}

scProcessorProxy, err := processProxy.NewSmartContractProcessorProxy(argsNewScProcessor, pcf.epochNotifier)
Expand Down Expand Up @@ -590,9 +589,8 @@ func (pcf *processComponentsFactory) newMetaBlockProcessor(
BadTxForwarder: badTxForwarder,
EnableRoundsHandler: pcf.coreData.EnableRoundsHandler(),
EnableEpochsHandler: pcf.coreData.EnableEpochsHandler(),
// TODO: is this correct?
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: wasmVMChangeLocker,
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: wasmVMChangeLocker,
}

scProcessorProxy, err := processProxy.NewSmartContractProcessorProxy(argsNewScProcessor, pcf.epochNotifier)
Expand Down
3 changes: 1 addition & 2 deletions genesis/process/metaGenesisBlockCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,7 @@ func createProcessorsForMetaGenesisBlock(arg ArgsGenesisBlockCreator, enableEpoc
EnableEpochsHandler: enableEpochsHandler,
IsGenesisProcessing: true,
WasmVMChangeLocker: &sync.RWMutex{}, // local Locker as to not interfere with the rest of the components
// TODO: is this correct?
VMOutputCacher: txcache.NewDisabledCache(),
VMOutputCacher: txcache.NewDisabledCache(),
}

scProcessorProxy, err := processProxy.NewSmartContractProcessorProxy(argsNewSCProcessor, epochNotifier)
Expand Down
5 changes: 2 additions & 3 deletions genesis/process/shardGenesisBlockCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,8 @@ func createProcessorsForShardGenesisBlock(arg ArgsGenesisBlockCreator, enableEpo
EnableRoundsHandler: enableRoundsHandler,
EnableEpochsHandler: enableEpochsHandler,
IsGenesisProcessing: true,
// TODO: is this correct?
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: genesisWasmVMLocker,
VMOutputCacher: txcache.NewDisabledCache(),
WasmVMChangeLocker: genesisWasmVMLocker,
}

scProcessorProxy, err := processProxy.NewSmartContractProcessorProxy(argsNewScProcessor, epochNotifier)
Expand Down
3 changes: 1 addition & 2 deletions integrationTests/vm/wasm/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ func (context *TestContext) initTxProcessorWithOneSCExecutorWithVMs() {
EnableRoundsHandler: context.EnableRoundsHandler,
EnableEpochsHandler: context.EnableEpochsHandler,
WasmVMChangeLocker: context.WasmVMChangeLocker,
// TODO: is this correct?
VMOutputCacher: txcache.NewDisabledCache(),
VMOutputCacher: txcache.NewDisabledCache(),
}

context.ScProcessor, err = processProxy.NewTestSmartContractProcessorProxy(argsNewSCProcessor, context.EpochNotifier)
Expand Down

0 comments on commit 5f8d03f

Please sign in to comment.