Skip to content

Commit

Permalink
Fix cargo clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Apr 23, 2024
1 parent 9004ff5 commit 685f3d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rpc/src/module/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl PoolRpcImpl {
&self.well_known_lock_scripts,
&self.well_known_type_scripts,
)
.validate(&tx),
.validate(tx),
} {
return Err(RPCError::custom_with_data(
RPCError::PoolRejectedTransactionByOutputsValidator,
Expand Down
10 changes: 3 additions & 7 deletions tx-pool/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,7 @@ impl TxPoolService {

let (pre_check_ret, snapshot) = self.pre_check(&tx).await;

let (_tip_hash, rtx, status, _fee, _tx_size) = match pre_check_ret {
Ok(ret_ok) => ret_ok,
Err(err) => return Err(err.into()),
};
let (_tip_hash, rtx, status, _fee, _tx_size) = pre_check_ret?;

// skip check the delay window

Expand All @@ -889,14 +886,13 @@ impl TxPoolService {
let tip_header = snapshot.tip_header();
let tx_env = Arc::new(status.with_env(tip_header));

let verified_ret = verify_rtx(
verify_rtx(
Arc::clone(&snapshot),
Arc::clone(&rtx),
tx_env,
&verify_cache,
max_cycles,
);
verified_ret
)
}

pub(crate) async fn update_tx_pool_for_reorg(
Expand Down

0 comments on commit 685f3d7

Please sign in to comment.