mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Only add wallet info to protx list/info when wallet is enabled
This commit is contained in:
parent
9ef2b05884
commit
c9608bf930
@ -952,14 +952,18 @@ UniValue BuildDMNListEntry(CWallet* pwallet, const CDeterministicMNCPtr& dmn, bo
|
||||
ownsCollateral = CheckWalletOwnsScript(pwallet, collateralTx->vout[dmn->collateralOutpoint.n].scriptPubKey);
|
||||
}
|
||||
|
||||
UniValue walletObj(UniValue::VOBJ);
|
||||
walletObj.push_back(Pair("hasOwnerKey", hasOwnerKey));
|
||||
walletObj.push_back(Pair("hasOperatorKey", hasOperatorKey));
|
||||
walletObj.push_back(Pair("hasVotingKey", hasVotingKey));
|
||||
walletObj.push_back(Pair("ownsCollateral", ownsCollateral));
|
||||
walletObj.push_back(Pair("ownsPayeeScript", CheckWalletOwnsScript(pwallet, dmn->pdmnState->scriptPayout)));
|
||||
walletObj.push_back(Pair("ownsOperatorRewardScript", CheckWalletOwnsScript(pwallet, dmn->pdmnState->scriptOperatorPayout)));
|
||||
o.push_back(Pair("wallet", walletObj));
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwallet) {
|
||||
UniValue walletObj(UniValue::VOBJ);
|
||||
walletObj.push_back(Pair("hasOwnerKey", hasOwnerKey));
|
||||
walletObj.push_back(Pair("hasOperatorKey", hasOperatorKey));
|
||||
walletObj.push_back(Pair("hasVotingKey", hasVotingKey));
|
||||
walletObj.push_back(Pair("ownsCollateral", ownsCollateral));
|
||||
walletObj.push_back(Pair("ownsPayeeScript", CheckWalletOwnsScript(pwallet, dmn->pdmnState->scriptPayout)));
|
||||
walletObj.push_back(Pair("ownsOperatorRewardScript", CheckWalletOwnsScript(pwallet, dmn->pdmnState->scriptOperatorPayout)));
|
||||
o.push_back(Pair("wallet", walletObj));
|
||||
}
|
||||
#endif
|
||||
|
||||
auto metaInfo = mmetaman.GetMetaInfo(dmn->proTxHash);
|
||||
o.push_back(Pair("metaInfo", metaInfo->ToJson()));
|
||||
|
Loading…
Reference in New Issue
Block a user