diff --git a/src/crypto.rs b/src/crypto.rs index d4db92a..d957e65 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -8,10 +8,10 @@ lazy_static::lazy_static! { } pub fn verify_proof(public_key: &[u8], proof: &[u8], hash: Hash) -> Result<()> { - let verifed = VRF.verify(public_key, proof, &hash); + let verified = VRF.verify(public_key, proof, &hash); // If we don't get an error it's always ok - verifed?; + verified?; Ok(()) } diff --git a/src/msgs/staking/query.rs b/src/msgs/staking/query.rs index ed8f45a..997dad0 100644 --- a/src/msgs/staking/query.rs +++ b/src/msgs/staking/query.rs @@ -12,7 +12,7 @@ pub enum QueryMsg { #[cfg_attr(feature = "cosmwasm", returns(StakerAndSeq))] GetStakerAndSeq { public_key: String }, #[cfg_attr(feature = "cosmwasm", returns(bool))] - IsExecutorEligible { public_key: String }, + IsExecutorEligible { proof: String, dr_id: String }, #[cfg_attr(feature = "cosmwasm", returns(StakingConfig))] GetStakingConfig {}, } diff --git a/src/msgs/staking/query_tests.rs b/src/msgs/staking/query_tests.rs index 8b28bca..b94a1a8 100644 --- a/src/msgs/staking/query_tests.rs +++ b/src/msgs/staking/query_tests.rs @@ -49,11 +49,13 @@ fn json_get_staker_and_seq() { fn json_is_executor_eligible() { let expected_json = json!({ "is_executor_eligible": { - "public_key": "public_key" + "proof": "public_key", + "dr_id": "dr_id" } }); let msg: QueryMsg = StakingQueryMsg::IsExecutorEligible { - public_key: "public_key".to_string(), + proof: "public_key".to_string(), + dr_id: "dr_id".to_string(), } .into(); assert_json_ok(msg, expected_json);