Add vote instructions that directly update on chain vote state (#21531)
* Add vote state instructions UpdateVoteState and UpdateVoteStateSwitch * cargo tree * extract vote state version conversion to common fn
This commit is contained in:
@ -1042,7 +1042,7 @@ impl ClusterInfo {
|
||||
"invalid vote index: {}, switch: {}, vote slots: {:?}, tower: {:?}",
|
||||
vote_index,
|
||||
hash.is_some(),
|
||||
vote.slots,
|
||||
vote.slots(),
|
||||
tower
|
||||
);
|
||||
}
|
||||
|
@ -306,8 +306,8 @@ impl Sanitize for Vote {
|
||||
|
||||
impl Vote {
|
||||
pub fn new(from: Pubkey, transaction: Transaction, wallclock: u64) -> Self {
|
||||
let slot = parse_vote_transaction(&transaction)
|
||||
.and_then(|(_, vote, _)| vote.slots.last().copied());
|
||||
let slot =
|
||||
parse_vote_transaction(&transaction).and_then(|(_, vote, _)| vote.last_voted_slot());
|
||||
Self {
|
||||
from,
|
||||
transaction,
|
||||
|
Reference in New Issue
Block a user