Skip to content

Commit

Permalink
node: Fix check that returned nil instead of an error string
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsaigle committed Jul 4, 2024
1 parent 0d3529e commit 39d8fc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/pkg/governor/governor.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,10 @@ func (gov *ChainGovernor) CheckPendingForTime(now time.Time) ([]*common.MessageP
// Mandatory check to ensure that the token should be able to reduce the Governor limit.
if tokenEntry.flowCancels {
if destinationChainEntry, ok := gov.chains[payload.TargetChain]; ok {
// Defense in depth check. A transfer with this value should have been
// added to the pending list above instead of reaching this branch.
if ce.isBigTransfer(value) {
return nil, err
return nil, fmt.Errorf("refusing to add flow cancel transfer with value %d above the bigTransactionSize %d", transfer.dbTransfer.Value, ce.bigTransactionSize)
}

if err := destinationChainEntry.addFlowCancelTransferFromDbTransfer(&dbTransfer); err != nil {
Expand Down

0 comments on commit 39d8fc2

Please sign in to comment.