Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
deffrian committed Jan 2, 2025
1 parent 8343884 commit c04d17c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Optimism/CL/P2P/OptimismCLP2P.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private async void OnMessage(byte[] msg)

private async Task MainLoop()
{
while (true)
while (!_cancellationTokenSource.IsCancellationRequested)
{
try
{
Expand Down Expand Up @@ -173,6 +173,7 @@ private bool TryValidateAndDecodePayload(byte[] msg, [MaybeNullWhen(false)] out

private async Task<bool> SendNewPayloadToEL(ExecutionPayloadV3 executionPayload)
{
_cancellationTokenSource.Token.ThrowIfCancellationRequested();
ResultWrapper<PayloadStatusV1> npResult = await _engineRpcModule.engine_newPayloadV3(executionPayload, Array.Empty<byte[]>(),
executionPayload.ParentBeaconBlockRoot);

Expand All @@ -198,6 +199,7 @@ private async Task<bool> SendNewPayloadToEL(ExecutionPayloadV3 executionPayload)

private async Task<bool> SendForkChoiceUpdatedToEL(Hash256 headBlockHash)
{
_cancellationTokenSource.Token.ThrowIfCancellationRequested();
ResultWrapper<ForkchoiceUpdatedV1Result> fcuResult = await _engineRpcModule.engine_forkchoiceUpdatedV3(
new ForkchoiceStateV1(headBlockHash, headBlockHash, headBlockHash),
null);
Expand Down

0 comments on commit c04d17c

Please sign in to comment.