Skip to content

Commit

Permalink
movement check
Browse files Browse the repository at this point in the history
  • Loading branch information
MissingNO57 committed Oct 25, 2024
1 parent 77b6810 commit 70d5a55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/upgrade_network_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ func VerifyConfig(cudosCfg *CudosMergeConfig, sourceAddrPrefix string, DestAddrP
if err != nil {
return err
}
if movement.SourceAddress == movement.DestinationAddress {
return fmt.Errorf("movement source and destination address is the same for %s", movement.SourceAddress)
}
if movement.Amount != nil && movement.Amount.IsNegative() {
return fmt.Errorf("negative amount %s for movement from account %s to %s", movement.Amount, movement.SourceAddress, movement.DestinationAddress)
}
Expand Down

0 comments on commit 70d5a55

Please sign in to comment.