@@ -62,7 +62,7 @@ use tari_core::{
6262 consensus:: { emission:: Emission , ConsensusManager , NetworkConsensus } ,
6363 iterators:: NonOverlappingIntegerPairIter ,
6464 mempool:: { service:: LocalMempoolService , TxStorageResponse } ,
65- proof_of_work:: PowAlgorithm ,
65+ proof_of_work:: { Difficulty , PowAlgorithm } ,
6666 transactions:: {
6767 generate_coinbase_with_wallet_output,
6868 transaction_components:: {
@@ -82,7 +82,7 @@ use tari_p2p::{auto_update::SoftwareUpdaterHandle, services::liveness::LivenessH
8282use tari_utilities:: { hex:: Hex , message_format:: MessageFormat , ByteArray } ;
8383use tokio:: task;
8484use tonic:: { Request , Response , Status } ;
85- use tari_core :: proof_of_work :: Difficulty ;
85+
8686use crate :: {
8787 builder:: BaseNodeContext ,
8888 grpc:: {
@@ -424,7 +424,8 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
424424 e. to_string( )
425425 ) ;
426426 obscure_error_if_true ( report_error_flag, Status :: internal ( e. to_string ( ) ) )
427- } ) . unwrap_or ( Difficulty :: min ( ) ) ;
427+ } )
428+ . unwrap_or ( Difficulty :: min ( ) ) ;
428429 let target_time = constants. pow_target_block_interval ( PowAlgorithm :: Sha3x ) ;
429430 let estimated_hash_rate = target_difficulty. as_u64 ( ) . checked_div ( target_time) . unwrap_or ( 0 ) ;
430431 self . data_cache
@@ -450,7 +451,8 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
450451 e. to_string( )
451452 ) ;
452453 obscure_error_if_true ( report_error_flag, Status :: internal ( e. to_string ( ) ) )
453- } ) . unwrap_or ( Difficulty :: min ( ) ) ;
454+ } )
455+ . unwrap_or ( Difficulty :: min ( ) ) ;
454456 let target_time = constants. pow_target_block_interval ( PowAlgorithm :: RandomXM ) ;
455457 let estimated_hash_rate = target_difficulty. as_u64 ( ) . checked_div ( target_time) . unwrap_or ( 0 ) ;
456458 self . data_cache
@@ -477,7 +479,8 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer {
477479 e. to_string( )
478480 ) ;
479481 obscure_error_if_true ( report_error_flag, Status :: internal ( e. to_string ( ) ) )
480- } ) . unwrap_or ( Difficulty :: min ( ) ) ;
482+ } )
483+ . unwrap_or ( Difficulty :: min ( ) ) ;
481484 let target_time = constants. pow_target_block_interval ( PowAlgorithm :: RandomXT ) ;
482485 let estimated_hash_rate = target_difficulty. as_u64 ( ) . checked_div ( target_time) . unwrap_or ( 0 ) ;
483486 self . data_cache
0 commit comments