diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs index 690e31b3274..e9d3dea3354 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs @@ -5,6 +5,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Numerics; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -427,7 +428,14 @@ private void ApplyMinerReward(Block block, BlockReward reward, IReleaseSpec spec // TODO: block processor pipeline private void ApplyDaoTransition(Block block) { - if (_specProvider.DaoBlockNumber.HasValue && _specProvider.DaoBlockNumber.Value == block.Header.Number) + long? daoBlockNumber = _specProvider.DaoBlockNumber; + if (daoBlockNumber.HasValue && daoBlockNumber.Value == block.Header.Number) + { + ApplyTransition(); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + void ApplyTransition() { if (_logger.IsInfo) _logger.Info("Applying the DAO transition"); Address withdrawAccount = DaoData.DaoWithdrawalAccount;