Skip to content

Commit

Permalink
Fixed crash if request attestations failed (accessing result in err c…
Browse files Browse the repository at this point in the history
…ase)
  • Loading branch information
alexsporn committed Sep 18, 2023
1 parent 3ff07b1 commit 89433c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/protocol/protocol_fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (p *Protocol) processFork(fork *chainmanager.Fork) (anchorBlockIDs iotago.B

result, err := p.requestAttestation(ctx, fork.ForkedChain.Commitment(i).ID(), fork.Source, ch)
if err != nil {
return nil, false, true, ierrors.Wrapf(err, "failed to verify commitment %s", result.commitment.ID())
return nil, false, true, ierrors.Wrapf(err, "failed to verify commitment %s", fork.ForkedChain.Commitment(i).ID())
}

// Count how many consecutive slots are heavier/lighter than the main chain.
Expand Down

0 comments on commit 89433c5

Please sign in to comment.