mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-13 09:08:02 +08:00
Merge branch 'feat/chain-view-integration' into feat/anchor-block-detect
This commit is contained in:
@@ -89,17 +89,12 @@ impl SignalBools {
|
||||
fn receive_signal(&mut self) -> CoordinatorEvents {
|
||||
if self.stop {
|
||||
return CoordinatorEvents::STOP
|
||||
} else if self.new_stacks_block || self.new_burn_block {
|
||||
// randomly choose if both are activated
|
||||
let process_stacks_block = self.new_stacks_block &&
|
||||
(!self.new_burn_block || rand::random::<bool>());
|
||||
if process_stacks_block {
|
||||
self.new_stacks_block = false;
|
||||
return CoordinatorEvents::NEW_STACKS_BLOCK;
|
||||
} else {
|
||||
self.new_burn_block = false;
|
||||
return CoordinatorEvents::NEW_BURN_BLOCK;
|
||||
}
|
||||
} else if self.new_burn_block {
|
||||
self.new_burn_block = false;
|
||||
return CoordinatorEvents::NEW_BURN_BLOCK;
|
||||
} else if self.new_stacks_block {
|
||||
self.new_stacks_block = false;
|
||||
return CoordinatorEvents::NEW_STACKS_BLOCK;
|
||||
} else {
|
||||
return CoordinatorEvents::TIMEOUT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user