Skip to content

Commit 96c9b46

Browse files
committed
fix: getblock for withdrawal transaction if verbosity level is 2
1 parent 0946eec commit 96c9b46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core_write.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add
334334
}
335335

336336
if (calculate_fee) {
337-
const CAmount fee = amt_total_in - amt_total_out;
337+
CAmount fee = amt_total_in - amt_total_out;
338+
if (tx.nType == TRANSACTION_ASSET_UNLOCK) {
339+
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
340+
}
338341
CHECK_NONFATAL(MoneyRange(fee));
339342
entry.pushKV("fee", ValueFromAmount(fee));
340343
}

0 commit comments

Comments
 (0)