@@ -1053,7 +1053,7 @@ impl LocalStateMachine {
1053
1053
expected_burn_block,
1054
1054
prior_state_machine. burn_block_height ,
1055
1055
prior_state_machine. burn_block ,
1056
- ) ? {
1056
+ ) {
1057
1057
info ! ( "Detected bitcoin fork - prior tip is not parent of new tip." ;
1058
1058
"new_tip.burn_block_height" => expected_burn_block. burn_block_height,
1059
1059
"new_tip.consensus_hash" => %expected_burn_block. consensus_hash,
@@ -1317,14 +1317,14 @@ impl LocalStateMachine {
1317
1317
new_burn_block : & NewBurnBlock ,
1318
1318
prior_burn_block_height : u64 ,
1319
1319
prior_burn_block_ch : ConsensusHash ,
1320
- ) -> Result < bool , SignerChainstateError > {
1320
+ ) -> bool {
1321
1321
let max_height_delta = 10 ;
1322
1322
let height_delta = match new_burn_block
1323
1323
. burn_block_height
1324
1324
. checked_sub ( prior_burn_block_height)
1325
1325
{
1326
- None | Some ( 0 ) => return Ok ( false ) , // same height or older
1327
- Some ( d) if d > max_height_delta => return Ok ( false ) , // too far apart
1326
+ None | Some ( 0 ) => return false , // same height or older
1327
+ Some ( d) if d > max_height_delta => return false , // too far apart
1328
1328
Some ( d) => d,
1329
1329
} ;
1330
1330
@@ -1340,13 +1340,13 @@ impl LocalStateMachine {
1340
1340
new_burn_block. consensus_hash;
1341
1341
"error" => ?e,
1342
1342
) ;
1343
- return Ok ( false ) ;
1343
+ return false ;
1344
1344
}
1345
1345
} ;
1346
1346
1347
1347
for _ in 0 ..height_delta {
1348
1348
if parent_burn_block_info. block_height == prior_burn_block_height {
1349
- return Ok ( parent_burn_block_info. consensus_hash != prior_burn_block_ch) ;
1349
+ return parent_burn_block_info. consensus_hash != prior_burn_block_ch;
1350
1350
}
1351
1351
1352
1352
parent_burn_block_info =
@@ -1357,11 +1357,11 @@ impl LocalStateMachine {
1357
1357
"Failed to get parent burn block info for {}. Error: {e}" ,
1358
1358
parent_burn_block_info. parent_burn_block_hash
1359
1359
) ;
1360
- return Ok ( false ) ;
1360
+ return false ;
1361
1361
}
1362
1362
} ;
1363
1363
}
1364
1364
1365
- Ok ( false )
1365
+ false
1366
1366
}
1367
1367
}
0 commit comments