mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 22:57:59 -05:00
validatord/protocol_sync.rs: handle_receive_block correct flag value handling
This commit is contained in:
@@ -315,7 +315,7 @@ async fn start(executor: Arc<Executor<'_>>, opts: &Opt) -> Result<()> {
|
||||
|
||||
// Adding ProtocolSync to the registry
|
||||
let state2 = state.clone();
|
||||
let consensus_mode = false; // This flag should be based on staking
|
||||
let consensus_mode = true; // This flag should be based on staking
|
||||
registry
|
||||
.register(net::SESSION_ALL, move |channel, main_p2p| {
|
||||
let state = state2.clone();
|
||||
|
||||
@@ -90,7 +90,7 @@ impl ProtocolSync {
|
||||
// Consensus mode enabled nodes have already performed this steps,
|
||||
// during proposal finalization.
|
||||
// Extra validations can be added here.
|
||||
if self.consensus_mode {
|
||||
if !self.consensus_mode {
|
||||
let info_copy = (*info).clone();
|
||||
if !self.state.read().unwrap().blockchain.has_block(&info_copy)? {
|
||||
self.state.write().unwrap().blockchain.add_by_info(info_copy.clone())?;
|
||||
|
||||
Reference in New Issue
Block a user