mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
refactor: use IsPlatformTransfer in core_write and rpc/blockchain
This commit is contained in:
parent
f6169fade4
commit
b9a46f6d2c
@ -335,7 +335,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add
|
|||||||
|
|
||||||
if (calculate_fee) {
|
if (calculate_fee) {
|
||||||
CAmount fee = amt_total_in - amt_total_out;
|
CAmount fee = amt_total_in - amt_total_out;
|
||||||
if (tx.nType == TRANSACTION_ASSET_UNLOCK) {
|
if (tx.IsPlatformTransfer()) {
|
||||||
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
|
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
|
||||||
}
|
}
|
||||||
CHECK_NONFATAL(MoneyRange(fee));
|
CHECK_NONFATAL(MoneyRange(fee));
|
||||||
|
@ -2452,7 +2452,7 @@ 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) {
|
if (tx->IsPlatformTransfer()) {
|
||||||
txfee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
|
txfee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user