fix: getblock for withdrawal transaction if verbosity level is 2

This commit is contained in:
Konstantin Akimov 2024-10-22 18:56:14 +07:00
parent 0946eec692
commit 96c9b469ca
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -334,7 +334,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add
} }
if (calculate_fee) { if (calculate_fee) {
const CAmount fee = amt_total_in - amt_total_out; CAmount fee = amt_total_in - amt_total_out;
if (tx.nType == TRANSACTION_ASSET_UNLOCK) {
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
}
CHECK_NONFATAL(MoneyRange(fee)); CHECK_NONFATAL(MoneyRange(fee));
entry.pushKV("fee", ValueFromAmount(fee)); entry.pushKV("fee", ValueFromAmount(fee));
} }