fix: make composite rpc 'masternode payments' to work with withdrawals

This commit is contained in:
Konstantin Akimov 2024-10-22 20:40:50 +07:00
parent e498378eb7
commit f6169fade4
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h> #include <chainparams.h>
#include <evo/assetlocktx.h>
#include <evo/chainhelper.h> #include <evo/chainhelper.h>
#include <evo/deterministicmns.h> #include <evo/deterministicmns.h>
#include <governance/classes.h> #include <governance/classes.h>
@ -406,6 +407,11 @@ static RPCHelpMan masternode_payments()
if (tx->IsCoinBase()) { if (tx->IsCoinBase()) {
continue; continue;
} }
if (tx->IsPlatformTransfer()) {
nBlockFees += CHECK_NONFATAL(GetTxPayload<CAssetUnlockPayload>(*tx))->getFee();
continue;
}
CAmount nValueIn{0}; CAmount nValueIn{0};
for (const auto& txin : tx->vin) { for (const auto& txin : tx->vin) {
uint256 blockHashTmp; uint256 blockHashTmp;