Closed whfuyn closed 2 years ago
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/peer.rs#L210-L211
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/peer.rs#L346-L347
update_block_height after update_consensus_config is not needed. The former is only an optimization for the frequently updated block height data which is a part of the consensus config.
update_block_height
update_consensus_config
I should have added a comment about this.
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/storage.rs#L598-L600
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/storage.rs#L585-L587
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/peer.rs#L210-L211
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/peer.rs#L346-L347
update_block_height
afterupdate_consensus_config
is not needed. The former is only an optimization for the frequently updated block height data which is a part of the consensus config.I should have added a comment about this.
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/storage.rs#L598-L600
https://github.com/cita-cloud/consensus_raft/blob/55971e8d7569b287f96e3dd569117ccc626c3f09/src/storage.rs#L585-L587