@@ -2024,6 +2024,19 @@ bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
20242024 return CTransaction (tx1) == CTransaction (tx2);
20252025}
20262026
2027+ CAmountMap CWalletTx::GetIssuanceAssets (unsigned int input_index) const {
2028+ CAmountMap ret;
2029+ CAsset asset, token;
2030+ GetIssuanceAssets (input_index, &asset, &token);
2031+ if (!asset.IsNull ()) {
2032+ ret[asset] = GetIssuanceAmount (input_index, false );
2033+ }
2034+ if (!token.IsNull ()) {
2035+ ret[token] = GetIssuanceAmount (input_index, true );
2036+ }
2037+ return ret;
2038+ }
2039+
20272040std::vector<uint256> CWallet::ResendWalletTransactionsBefore (int64_t nTime, CConnman* connman)
20282041{
20292042 std::vector<uint256> result;
@@ -5196,9 +5209,9 @@ CPubKey CWalletTx::GetOutputBlindingPubKey(unsigned int output_index) const {
51965209 return ret;
51975210}
51985211
5199- void CWalletTx::GetIssuanceAssets (unsigned int vinIndex , CAsset* out_asset, CAsset* out_reissuance_token) const {
5200- assert (vinIndex < tx->vin .size ());
5201- const CAssetIssuance& issuance = tx->vin [vinIndex ].assetIssuance ;
5212+ void CWalletTx::GetIssuanceAssets (unsigned int input_index , CAsset* out_asset, CAsset* out_reissuance_token) const {
5213+ assert (input_index < tx->vin .size ());
5214+ const CAssetIssuance& issuance = tx->vin [input_index ].assetIssuance ;
52025215
52035216 if (out_asset && issuance.nAmount .IsNull ()) {
52045217 out_asset->SetNull ();
@@ -5212,7 +5225,7 @@ void CWalletTx::GetIssuanceAssets(unsigned int vinIndex, CAsset* out_asset, CAss
52125225
52135226 if (issuance.assetBlindingNonce .IsNull ()) {
52145227 uint256 entropy;
5215- GenerateAssetEntropy (entropy, tx->vin [vinIndex ].prevout , issuance.assetEntropy );
5228+ GenerateAssetEntropy (entropy, tx->vin [input_index ].prevout , issuance.assetEntropy );
52165229 if (out_reissuance_token) {
52175230 CalculateReissuanceToken (*out_reissuance_token, entropy, issuance.nAmount .IsCommitment ());
52185231 }
0 commit comments