Skip to content

Commit

Permalink
fix: allow allocations of zero (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus authored Oct 25, 2023
1 parent 336a51d commit 260b403
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions indexer-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@ impl State {
selection_limit,
)?;

if state.status.allocation == GRT::zero() {
return Err(IndexerError::NoAllocation.into());
}

let reliability = state.reliability.expected_value();
let perf_success = state.perf_success.expected_value();
let slashable_usd = slashable.as_f64();
Expand Down
2 changes: 0 additions & 2 deletions indexer-selection/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ impl Topology {
set_err(IndexerError::NoStatus);
} else if status.stake == GRT::zero() {
set_err(IndexerError::NoStake);
} else if status.allocation == GRT::zero() {
set_err(IndexerError::NoAllocation);
} else if fee > request.params.budget.as_f64() {
set_err(IndexerError::FeeTooHigh);
}
Expand Down

0 comments on commit 260b403

Please sign in to comment.