diff --git a/src/Nethermind/Nethermind.Evm/OverridableCodeInfoRepository.cs b/src/Nethermind/Nethermind.Evm/OverridableCodeInfoRepository.cs index c5343fee1371..0342586f261d 100644 --- a/src/Nethermind/Nethermind.Evm/OverridableCodeInfoRepository.cs +++ b/src/Nethermind/Nethermind.Evm/OverridableCodeInfoRepository.cs @@ -50,6 +50,6 @@ public bool TryGetDelegation(IReadOnlyStateProvider worldState, Address address, public ValueHash256 GetExecutableCodeHash(IWorldState worldState, Address address) => codeInfoRepository.GetExecutableCodeHash(worldState, address); - + public void ResetOverrides() => _codeOverwrites.Clear(); } diff --git a/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs b/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs index 523c185ef3d9..b36d2615327b 100644 --- a/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs +++ b/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs @@ -157,7 +157,7 @@ public void Call_uses_valid_post_merge_and_random_value() Transaction tx = Build.A.Transaction.TestObject; - _blockchainBridge.Call(header, tx, CancellationToken.None); + _blockchainBridge.Call(header, tx); _transactionProcessor.Received().CallAndRestore( tx, Arg.Is(blkCtx => @@ -173,7 +173,7 @@ public void Call_uses_valid_block_number() BlockHeader header = Build.A.BlockHeader.WithNumber(10).TestObject; Transaction tx = new() { GasLimit = Transaction.BaseTxGasCost }; - _blockchainBridge.Call(header, tx, CancellationToken.None); + _blockchainBridge.Call(header, tx); _transactionProcessor.Received().CallAndRestore( tx, Arg.Is(blkCtx => blkCtx.Header.Number == 10), @@ -188,7 +188,7 @@ public void Call_uses_valid_mix_hash() BlockHeader header = Build.A.BlockHeader.WithMixHash(TestItem.KeccakA).TestObject; Transaction tx = new() { GasLimit = Transaction.BaseTxGasCost }; - _blockchainBridge.Call(header, tx, CancellationToken.None); + _blockchainBridge.Call(header, tx); _transactionProcessor.Received().CallAndRestore( tx, Arg.Is(blkCtx => blkCtx.Header.MixHash == TestItem.KeccakA), @@ -203,7 +203,7 @@ public void Call_uses_valid_beneficiary() BlockHeader header = Build.A.BlockHeader.WithBeneficiary(TestItem.AddressB).TestObject; Transaction tx = new() { GasLimit = Transaction.BaseTxGasCost }; - _blockchainBridge.Call(header, tx, CancellationToken.None); + _blockchainBridge.Call(header, tx); _transactionProcessor.Received().CallAndRestore( tx, Arg.Is(blkCtx => blkCtx.Header.Beneficiary == TestItem.AddressB), diff --git a/src/Nethermind/Nethermind.Facade/BlockchainBridgeContract.cs b/src/Nethermind/Nethermind.Facade/BlockchainBridgeContract.cs index 438bb096bd0e..abe697c25404 100644 --- a/src/Nethermind/Nethermind.Facade/BlockchainBridgeContract.cs +++ b/src/Nethermind/Nethermind.Facade/BlockchainBridgeContract.cs @@ -36,7 +36,7 @@ public ConstantBridgeContract(Contract contract, IBlockchainBridge blockchainBri public override object[] Call(CallInfo callInfo) { var transaction = GenerateTransaction(callInfo); - var result = _blockchainBridge.Call(callInfo.ParentHeader, transaction, CancellationToken.None); + var result = _blockchainBridge.Call(callInfo.ParentHeader, transaction); if (!string.IsNullOrEmpty(result.Error)) { throw new AbiException(result.Error); diff --git a/src/Nethermind/Nethermind.Facade/IBlockchainBridge.cs b/src/Nethermind/Nethermind.Facade/IBlockchainBridge.cs index 90c7098c8fc4..70a83f3a52d9 100644 --- a/src/Nethermind/Nethermind.Facade/IBlockchainBridge.cs +++ b/src/Nethermind/Nethermind.Facade/IBlockchainBridge.cs @@ -27,8 +27,7 @@ public interface IBlockchainBridge : ILogFinder TxReceipt GetReceipt(Hash256 txHash); (TxReceipt? Receipt, TxGasInfo? GasInfo, int LogIndexStart) GetReceiptAndGasInfo(Hash256 txHash); (TxReceipt? Receipt, Transaction? Transaction, UInt256? baseFee) GetTransaction(Hash256 txHash, bool checkTxnPool = true); - CallOutput Call(BlockHeader header, Transaction tx, Dictionary? stateOverride, CancellationToken cancellationToken); - CallOutput Call(BlockHeader header, Transaction tx, CancellationToken cancellationToken) => Call(header, tx, null, cancellationToken); + CallOutput Call(BlockHeader header, Transaction tx, Dictionary? stateOverride = null, CancellationToken cancellationToken = default); SimulateOutput Simulate(BlockHeader header, SimulatePayload payload, CancellationToken cancellationToken); CallOutput EstimateGas(BlockHeader header, Transaction tx, int errorMarginBasisPoints, Dictionary stateOverride, CancellationToken cancellationToken); diff --git a/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceRpcModule.cs b/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceRpcModule.cs index 15e7ace3caf0..f0d1ebc29d19 100644 --- a/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceRpcModule.cs +++ b/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceRpcModule.cs @@ -168,7 +168,7 @@ private ResultWrapper TraceTx(Transaction tx, string[] BlockHeader nextHeader = header.Clone(); nextHeader.Number = header.Number + 1; nextHeader.ParentHash = header.Hash; - nextHeader.MaybeParent = new (header); + nextHeader.MaybeParent = new(header); Block block = new(nextHeader, [tx], []); nextHeader.Hash = block.CalculateHash();