mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
fix: make 6336 compile in v21.1.x branch, using older CHECK_NONFATAL functionality
This commit is contained in:
parent
cd6598ff10
commit
a7bbcc823d
@ -336,7 +336,9 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, bool include_add
|
||||
if (calculate_fee) {
|
||||
CAmount fee = amt_total_in - amt_total_out;
|
||||
if (tx.IsPlatformTransfer()) {
|
||||
fee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(tx))->getFee();
|
||||
auto payload = GetTxPayload<CAssetUnlockPayload>(tx);
|
||||
CHECK_NONFATAL(payload);
|
||||
fee = payload->getFee();
|
||||
}
|
||||
CHECK_NONFATAL(MoneyRange(fee));
|
||||
entry.pushKV("fee", ValueFromAmount(fee));
|
||||
|
@ -2453,7 +2453,9 @@ static RPCHelpMan getblockstats()
|
||||
CAmount txfee = tx_total_in - tx_total_out;
|
||||
|
||||
if (tx->IsPlatformTransfer()) {
|
||||
txfee = CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
|
||||
auto payload = GetTxPayload<CAssetUnlockPayload>(*tx);
|
||||
CHECK_NONFATAL(payload);
|
||||
txfee = payload->getFee();
|
||||
}
|
||||
|
||||
CHECK_NONFATAL(MoneyRange(txfee));
|
||||
|
@ -408,7 +408,9 @@ static RPCHelpMan masternode_payments()
|
||||
continue;
|
||||
}
|
||||
if (tx->IsPlatformTransfer()) {
|
||||
nBlockFees += CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
|
||||
auto payload = GetTxPayload<CAssetUnlockPayload>(*tx);
|
||||
CHECK_NONFATAL(payload);
|
||||
nBlockFees += payload->getFee();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user