From e0fc6203639ce4070b139bb1aaf2a565c15c7dbf Mon Sep 17 00:00:00 2001 From: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com> Date: Fri, 2 Aug 2024 00:52:10 +0100 Subject: [PATCH] handle miner txs when calculating fee --- test-utils/src/data/free.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test-utils/src/data/free.rs b/test-utils/src/data/free.rs index ccf1bff7..d2903260 100644 --- a/test-utils/src/data/free.rs +++ b/test-utils/src/data/free.rs @@ -122,8 +122,11 @@ pub fn tx_fee(tx: &Transaction) -> u64 { match &tx { Transaction::V1 { prefix, .. } => { for input in &prefix.inputs { - if let Input::ToKey { amount, .. } = input { - fee = fee.checked_add(amount.unwrap_or(0)).unwrap(); + match input { + Input::Gen(_) => return 0, + Input::ToKey { amount, .. } => { + fee = fee.checked_add(amount.unwrap_or(0)).unwrap(); + } } }