diff --git a/rpc/src/module/pool.rs b/rpc/src/module/pool.rs index fb702e74c6d..b365fa2d892 100644 --- a/rpc/src/module/pool.rs +++ b/rpc/src/module/pool.rs @@ -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, diff --git a/tx-pool/src/process.rs b/tx-pool/src/process.rs index 815ca3a76b8..39627ccf9a9 100644 --- a/tx-pool/src/process.rs +++ b/tx-pool/src/process.rs @@ -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 @@ -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(