You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some places in MultiTest, validator addresses are validated with let val_addr = api.addr_validate(&validator.address)?;. But the validator addresses are not the same as regular account addresses. I.e. I cannot use MultiTest to test with validator addresses.
Usually they have a different prefix, like mychainvaloper1... instead of mychain1.... This is the reason why they are always typed as String in cosmwasm-std, not Addr. The Addr type only works for user addresses.
So we need to avoid the use of the Addr type in the staking implementation:
In some places in MultiTest, validator addresses are validated with
let val_addr = api.addr_validate(&validator.address)?;
. But the validator addresses are not the same as regular account addresses. I.e. I cannot use MultiTest to test with validator addresses.Usually they have a different prefix, like
mychainvaloper1...
instead ofmychain1...
. This is the reason why they are always typed as String in cosmwasm-std, notAddr
. TheAddr
type only works for user addresses.So we need to avoid the use of the
Addr
type in the staking implementation:const VALIDATOR_MAP: Map<&Addr, Validator> = Map::new("validator_map");
const VALIDATOR_INFO: Map<&Addr, ValidatorInfo> = Map::new("validator_info");
pub validator: Addr,
fn add_validator
StakingMsg::Delegate
implementationStakingQuery::Delegation
implementationThe text was updated successfully, but these errors were encountered: