The funder is not a staker

This commit is contained in:
Greg Fitzgerald
2019-03-05 10:53:10 -07:00
parent 6e9d803091
commit 52fc974cdf
6 changed files with 25 additions and 69 deletions

View File

@ -172,7 +172,7 @@ impl LocalCluster {
let vote_account_user_data = client.get_account_userdata(&vote_account);
if let Ok(Some(vote_account_user_data)) = vote_account_user_data {
if let Ok(vote_state) = VoteState::deserialize(&vote_account_user_data) {
if vote_state.delegate_id == from_account.pubkey() {
if vote_state.delegate_id == vote_account {
return Ok(());
}
}

View File

@ -619,8 +619,7 @@ mod tests {
let vote_state = VoteState::deserialize(&account_user_data);
if vote_state.map(|vote_state| vote_state.delegate_id) == Ok(validator_keypair.pubkey())
{
if vote_state.map(|vote_state| vote_state.delegate_id) == Ok(vote_account_id) {
break;
}