Skip to content

Commit 1615714

Browse files
committed
small refactor
1 parent fa8af08 commit 1615714

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpc/methods/gas.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ impl RpcMethod<3> for GasEstimateFeeCap {
4242
ctx: Ctx<impl Blockstore + Send + Sync + 'static>,
4343
(msg, max_queue_blks, tsk): Self::Params,
4444
) -> Result<Self::Ok, ServerError> {
45-
estimate_fee_cap(&ctx, msg, max_queue_blks, &tsk).map(|n| TokenAmount::to_string(&n))
45+
estimate_fee_cap(&ctx, &msg, max_queue_blks, &tsk).map(|n| TokenAmount::to_string(&n))
4646
}
4747
}
4848

4949
fn estimate_fee_cap<DB: Blockstore>(
5050
data: &Ctx<DB>,
51-
msg: Message,
51+
msg: &Message,
5252
max_queue_blks: i64,
5353
ApiTipsetKey(ts_key): &ApiTipsetKey,
5454
) -> Result<TokenAmount, ServerError> {
@@ -340,7 +340,7 @@ where
340340
msg.set_gas_premium(gp);
341341
}
342342
if msg.gas_fee_cap.is_zero() {
343-
let gfp = estimate_fee_cap(data, msg.clone(), 20, &tsk)?;
343+
let gfp = estimate_fee_cap(data, &msg, 20, &tsk)?;
344344
msg.set_gas_fee_cap(gfp);
345345
}
346346

0 commit comments

Comments
 (0)