From 96c9b469cad439f2e2489a2a15d30d7a02e195cd Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Tue, 22 Oct 2024 18:56:14 +0700 Subject: [PATCH] fix: getblock for withdrawal transaction if verbosity level is 2 --- src/core_write.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core_write.cpp b/src/core_write.cpp index ffad7897ff..8999f9406f 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -334,7 +334,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add } 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(tx))->getFee(); + } CHECK_NONFATAL(MoneyRange(fee)); entry.pushKV("fee", ValueFromAmount(fee)); }