Skip to content

Commit

Permalink
auction: fail fast if the step count is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Apr 17, 2024
1 parent 05a6a8c commit 7d1294c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ impl ActionHandler for ActionDutchAuctionSchedule {
nonce: _,
} = self.description;

// Fail fast if the step count is zero
ensure!(step_count > 0, "step count MUST be positive (got zero)");

// Check that we disallow identical input/output ids.
ensure!(
input.asset_id != output_id,
Expand Down

0 comments on commit 7d1294c

Please sign in to comment.