Skip to content

fix: reject empty routing batches#141

Open
jamilahmadzai wants to merge 1 commit into
StableRoute-Org:mainfrom
jamilahmadzai:fix/stableroute-124-empty-batch
Open

fix: reject empty routing batches#141
jamilahmadzai wants to merge 1 commit into
StableRoute-Org:mainfrom
jamilahmadzai:fix/stableroute-124-empty-batch

Conversation

@jamilahmadzai

Copy link
Copy Markdown

Closes #124

Bounty: GrantFox OSS campaign for issue #124

Summary

  • add RouterError::EmptyBatch with code 19
  • reject empty register_pairs and set_pair_fees_bps batches after pause/admin checks and before max-size validation
  • update README/API docs and batch tests while keeping single-entry batches supported

Validation

  • cargo fmt --all -- --check
  • cargo build
  • cargo test test_register_pairs_rejects_empty_batch -- --nocapture
  • cargo test test_set_pair_fees_bps_rejects_empty_batch -- --nocapture
  • cargo test test_batch -- --nocapture
  • cargo test -- --nocapture
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject empty batches in register_pairs and set_pair_fees_bps with a typed EmptyBatch error

1 participant