fix single node testnet, remove bootstrap vote (#5534)

This commit is contained in:
Rob Walker
2019-08-15 18:58:46 -07:00
committed by GitHub
parent 4ee212ae4c
commit 94f1132fb6
7 changed files with 34 additions and 58 deletions

View File

@ -166,6 +166,7 @@ impl Tower {
}
pub fn record_vote(&mut self, slot: u64, hash: Hash) -> Option<u64> {
trace!("{} record_vote for {}", self.node_pubkey, slot);
let root_slot = self.lockouts.root_slot;
let vote = Vote { slot, hash };
self.lockouts.process_vote_unchecked(&vote);
@ -344,6 +345,12 @@ impl Tower {
if let Some((_stake, vote_account)) = bank.vote_accounts().get(vote_account_pubkey) {
let vote_state = VoteState::deserialize(&vote_account.data)
.expect("vote_account isn't a VoteState?");
trace!(
"{} lockouts initialized to {:?}",
self.node_pubkey,
vote_state
);
assert_eq!(
vote_state.node_pubkey, self.node_pubkey,
"vote account's node_pubkey doesn't match",

View File

@ -586,7 +586,7 @@ impl ReplayStage {
})
.filter(|b| {
let has_voted = tower.has_voted(b.slot());
trace!("bank is has_voted: {} {}", b.slot(), has_voted);
trace!("bank has_voted: {} {}", b.slot(), has_voted);
!has_voted
})
.filter(|b| {