Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszRozmej committed Aug 29, 2024
1 parent 5a33779 commit e102b0b
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 22 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ void Process(AuRaBlockProcessor auRaBlockProcessor, int blockNumber, Hash256 sta
LimboLogs.Instance,
Substitute.For<IBlockTree>(),
new WithdrawalProcessor(stateProvider, LimboLogs.Instance),
null,
txFilter,
txFilter: txFilter,
contractRewriter: contractRewriter);

return (processor, stateProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
null,
gasLimitOverride: GasLimitCalculator as AuRaContractGasLimitOverride,
preWarmer: CreateBlockCachePreWarmer());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
null,
preWarmer: CreateBlockCachePreWarmer());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,8 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
null,
PermissionBasedTxFilter,
null,
null,
CreateBlockCachePreWarmer());
txFilter: PermissionBasedTxFilter,
preWarmer: CreateBlockCachePreWarmer());
}

protected override async Task AddBlocksOnStart()
Expand Down
1 change: 0 additions & 1 deletion src/Nethermind/Nethermind.Blockchain/GenesisLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Core;
using Nethermind.Core.Extensions;
using Nethermind.Core.Specs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Nethermind.Evm.Tracing;
using Nethermind.Logging;
using Nethermind.State;
using Nethermind.Trie;
using Nethermind.TxPool;

namespace Nethermind.Consensus.AuRa
Expand All @@ -44,7 +45,7 @@ public AuRaBlockProcessor(
ILogManager logManager,
IBlockFinder blockTree,
IWithdrawalProcessor withdrawalProcessor,
IAuRaValidator? auRaValidator,
IAuRaValidator? auRaValidator = null,
ITxFilter? txFilter = null,
AuRaContractGasLimitOverride? gasLimitOverride = null,
ContractRewriter? contractRewriter = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ protected TxAction ProcessTransaction(
LinkedHashSet<Transaction> transactionsInBlock,
bool addToBlock = true)
{
AddingTxEventArgs args =
txPicker.CanAddTransaction(block, currentTx, transactionsInBlock,
stateProvider);
AddingTxEventArgs args = txPicker.CanAddTransaction(block, currentTx, transactionsInBlock, stateProvider);

if (args.Action != TxAction.Add)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ protected override AuRaBlockProcessor NewAuraBlockProcessor(ITxFilter txFilter,
new BeaconBlockRootHandler(transactionProcessor),
_api.LogManager,
_api.BlockTree!,
new AuraWithdrawalProcessor(
withdrawalContractFactory.Create(transactionProcessor), _api.LogManager),
new AuraWithdrawalProcessor(withdrawalContractFactory.Create(transactionProcessor), _api.LogManager),
CreateAuRaValidator(),
txFilter,
GetGasLimitCalculator(),
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,9 @@ private static void LoadGenesis(ChainSpecJson chainSpecJson, ChainSpec chainSpec
genesisHeader.AuRaStep = step;
genesisHeader.AuRaSignature = auRaSignature;

if (withdrawalsEnabled)
chainSpec.Genesis = new Block(genesisHeader, Array.Empty<Transaction>(), Array.Empty<BlockHeader>(), Array.Empty<Withdrawal>());
else
chainSpec.Genesis = new Block(genesisHeader);
chainSpec.Genesis = withdrawalsEnabled
? new Block(genesisHeader, Array.Empty<Transaction>(), Array.Empty<BlockHeader>(), Array.Empty<Withdrawal>())
: new Block(genesisHeader);
}

private static void LoadAllocations(ChainSpecJson chainSpecJson, ChainSpec chainSpec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Nethermind.Specs
{
public class SystemTransactionReleaseSpec(IReleaseSpec spec, bool isAura, bool isGenesis) : ReleaseSpecDecorator(spec)
{
private readonly IReleaseSpec _spec = spec;
public override bool IsEip158Enabled => !isAura && isGenesis && _spec.IsEip158Enabled;
public override bool IsEip158Enabled => !isAura && isGenesis && base.IsEip158Enabled;
}
}

0 comments on commit e102b0b

Please sign in to comment.