Skip to content

Commit

Permalink
fix(minor-service-registry): prevent zero bond (axelarnetwork#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcobb23 authored Aug 21, 2024
1 parent f752c6a commit b87368f
Show file tree
Hide file tree
Showing 19 changed files with 279 additions and 131 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ axelar-wasm-std = { version = "^1.0.0", path = "packages/axelar-wasm-std" }
axelar-wasm-std-derive = { version = "^1.0.0", path = "packages/axelar-wasm-std-derive" }
hex = "0.4.3"
integration-tests = { version = "^1.0.0", path = "integration-tests" }
into-inner-derive = { version = "^1.0.0", path = "packages/into-inner-derive" }
itertools = "0.11.0"
voting-verifier = { version = "^1.0.0", path = "contracts/voting-verifier" }
coordinator = { version = "^1.0.0", path = "contracts/coordinator" }
Expand Down
6 changes: 4 additions & 2 deletions contracts/multisig-prover/src/test/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fn service_registry_mock_querier_handler(
coordinator_contract: Addr::unchecked(COORDINATOR_ADDRESS),
min_num_verifiers: 1,
max_num_verifiers: Some(100),
min_verifier_bond: Uint128::new(1),
min_verifier_bond: Uint128::new(1).try_into().unwrap(),
bond_denom: "uaxl".to_string(),
unbonding_period_days: 1,
description: "verifiers".to_string(),
Expand All @@ -139,7 +139,9 @@ fn service_registry_mock_querier_handler(
.map(|op| WeightedVerifier {
verifier_info: Verifier {
address: op.address,
bonding_state: BondingState::Bonded { amount: op.weight },
bonding_state: BondingState::Bonded {
amount: op.weight.try_into().unwrap(),
},
authorization_state: AuthorizationState::Authorized,
service_name: SERVICE_NAME.to_string(),
},
Expand Down
Loading

0 comments on commit b87368f

Please sign in to comment.