| 3947 | } |
| 3948 | |
| 3949 | uint256 CWalletTx::GetIssuanceBlindingFactor(const CWallet& wallet, unsigned int input_index, bool reissuance_token) const { |
| 3950 | assert(input_index < tx->vin.size()); |
| 3951 | CAsset asset; |
| 3952 | const CAssetIssuance& issuance = tx->vin[input_index].assetIssuance; |
| 3953 | const CTxWitness& wit = tx->witness; |
| 3954 | GetIssuanceAssets(input_index, reissuance_token ? nullptr : &asset, reissuance_token ? &asset : nullptr); |
| 3955 | if (asset.IsNull()) { |
| 3956 | return uint256(); |
| 3957 | } |
| 3958 | const std::vector<unsigned char>& rangeproof = wit.vtxinwit.size() <= input_index ? std::vector<unsigned char>() : (reissuance_token ? wit.vtxinwit[input_index].vchInflationKeysRangeproof : wit.vtxinwit[input_index].vchIssuanceAmountRangeproof); |
| 3959 | unsigned int mapValueInd = GetPseudoInputOffset(input_index, reissuance_token) + tx->vout.size(); |
| 3960 | |
| 3961 | uint256 ret; |
| 3962 | CScript blindingScript(CScript() << OP_RETURN << std::vector<unsigned char>(tx->vin[input_index].prevout.hash.begin(), tx->vin[input_index].prevout.hash.end()) << tx->vin[input_index].prevout.n); |
| 3963 | GetBlindingData(wallet, mapValueInd, rangeproof, reissuance_token ? issuance.nInflationKeys : issuance.nAmount, CConfidentialAsset(asset), CConfidentialNonce(), blindingScript, nullptr, nullptr, &ret, nullptr, nullptr); |
| 3964 | return ret; |
| 3965 | } |
| 3966 | |
| 3967 | CAmount CWalletTx::GetIssuanceAmount(const CWallet& wallet, unsigned int input_index, bool reissuance_token) const { |
| 3968 | assert(input_index < tx->vin.size()); |
no test coverage detected