Skip to content

Commit

Permalink
daemon: allow rewind under stable height if its priority node
Browse files Browse the repository at this point in the history
  • Loading branch information
Slixe committed Jan 24, 2024
1 parent b7beb9d commit d00d78a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xelis_daemon/src/p2p/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,8 @@ impl<S: Storage> P2pServer<S> {
// check that if we can trust him
if peer.is_priority() {
warn!("Rewinding chain without checking because {} is a priority node (pop count: {})", peer, pop_count);
self.blockchain.rewind_chain(pop_count, true).await?;
// User trust him as a priority node, rewind chain without checking, allow to go below stable height also
self.blockchain.rewind_chain(pop_count, false).await?;
} else {
// request all blocks header and verify basic chain structure
let mut chain_validator = ChainValidator::new(self.blockchain.clone());
Expand Down

0 comments on commit d00d78a

Please sign in to comment.