Skip to content

Commit

Permalink
And jsonrpc also
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap committed Nov 5, 2024
1 parent 4bbd4a7 commit 0a95782
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal class ProcessingStats : IThreadPoolWorkItem
private long _runMicroseconds;
private long _reportMs;
private Block? _lastBlock;
private Hash256 _lastBranchRoot;
private Hash256? _lastBranchRoot;
private long _sloadOpcodeProcessing;
private long _sstoreOpcodeProcessing;
private long _callsProcessing;
Expand Down Expand Up @@ -132,7 +132,7 @@ void IThreadPoolWorkItem.Execute()
isMev = true;
}

if (!_stateReader.HasStateForRoot(_lastBranchRoot) || !_stateReader.HasStateForRoot(block.StateRoot))
if (_lastBranchRoot == null || !_stateReader.HasStateForRoot(_lastBranchRoot) || block.StateRoot == null || !_stateReader.HasStateForRoot(block.StateRoot))
return;
UInt256 beforeBalance = _stateReader.GetBalance(_lastBranchRoot, beneficiary);
UInt256 afterBalance = _stateReader.GetBalance(block.StateRoot, beneficiary);
Expand Down

0 comments on commit 0a95782

Please sign in to comment.