Skip to content

Commit 67fe44a

Browse files
committed
CRC: remove unnecessary and_then and just pass up the error in is_parent_processed fn
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
1 parent 7bd8d30 commit 67fe44a

File tree

1 file changed

+2
-3
lines changed
  • testnet/stacks-node/src/nakamoto_node

1 file changed

+2
-3
lines changed

testnet/stacks-node/src/nakamoto_node/miner.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,8 @@ impl BlockMinerThread {
563563
let mut burn_db =
564564
SortitionDB::open(&burn_db_path, true, self.burnchain.pox_constants.clone())
565565
.expect("FATAL: could not open sortition DB");
566-
let burn_tip_changed = self.check_burn_tip_changed(&burn_db);
567-
match burn_tip_changed.and_then(|_| self.load_block_parent_info(&mut burn_db, chain_state))
568-
{
566+
self.check_burn_tip_changed(&burn_db)?;
567+
match self.load_block_parent_info(&mut burn_db, chain_state) {
569568
Ok(..) => Ok(true),
570569
Err(NakamotoNodeError::ParentNotFound) => Ok(false),
571570
Err(e) => {

0 commit comments

Comments
 (0)