mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: getblockstats rpc to work with withdrawal transactions
This commit is contained in:
parent
96c9b469ca
commit
ab7172bc8f
@ -49,6 +49,7 @@
|
|||||||
#include <versionbits.h>
|
#include <versionbits.h>
|
||||||
#include <warnings.h>
|
#include <warnings.h>
|
||||||
|
|
||||||
|
#include <evo/assetlocktx.h>
|
||||||
#include <evo/cbtx.h>
|
#include <evo/cbtx.h>
|
||||||
#include <evo/evodb.h>
|
#include <evo/evodb.h>
|
||||||
#include <evo/mnhftx.h>
|
#include <evo/mnhftx.h>
|
||||||
@ -2450,6 +2451,11 @@ static RPCHelpMan getblockstats()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CAmount txfee = tx_total_in - tx_total_out;
|
CAmount txfee = tx_total_in - tx_total_out;
|
||||||
|
|
||||||
|
if (tx->nType == TRANSACTION_ASSET_UNLOCK) {
|
||||||
|
txfee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
|
||||||
|
}
|
||||||
|
|
||||||
CHECK_NONFATAL(MoneyRange(txfee));
|
CHECK_NONFATAL(MoneyRange(txfee));
|
||||||
if (do_medianfee) {
|
if (do_medianfee) {
|
||||||
fee_array.push_back(txfee);
|
fee_array.push_back(txfee);
|
||||||
|
Loading…
Reference in New Issue
Block a user