Skip to content

Commit

Permalink
Merge pull request #2336 from Taraxa-project/peer_chain_size
Browse files Browse the repository at this point in the history
fix: peer chain size
  • Loading branch information
mfrankovi authored Feb 22, 2023
2 parents 877540a + 0751a02 commit 368167f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void VotePacketHandler::process(const PacketData &packet_data, const std::shared
onNewPbftVote(vote, pbft_block);

// Update peer's max chain size
if (peer_chain_size.has_value() && *peer_chain_size > peer->pbft_chain_size_) {
if (peer_chain_size.has_value() && vote->getVoter() == peer->getId() && *peer_chain_size > peer->pbft_chain_size_) {
peer->pbft_chain_size_ = *peer_chain_size;
}
}
Expand Down

0 comments on commit 368167f

Please sign in to comment.