@@ -1051,9 +1051,9 @@ bool CWalletTx::WriteToDisk(CWalletDB *pwalletdb)
|
||||
return pwalletdb->WriteTx(GetHash(), *this);
|
||||
}
|
||||
|
||||
void CWallet::WitnessBucketCommitment(std::vector<uint256> commitments,
|
||||
std::vector<boost::optional<ZCIncrementalWitness>>& witnesses,
|
||||
uint256 &final_anchor)
|
||||
void CWallet::WitnessNoteCommitment(std::vector<uint256> commitments,
|
||||
std::vector<boost::optional<ZCIncrementalWitness>>& witnesses,
|
||||
uint256 &final_anchor)
|
||||
{
|
||||
witnesses.resize(commitments.size());
|
||||
CBlockIndex* pindex = chainActive.Genesis();
|
||||
@@ -1067,19 +1067,19 @@ void CWallet::WitnessBucketCommitment(std::vector<uint256> commitments,
|
||||
{
|
||||
BOOST_FOREACH(const JSDescription& pour, tx.vjoinsplit)
|
||||
{
|
||||
BOOST_FOREACH(const uint256 &bucket_commitment, pour.commitments)
|
||||
BOOST_FOREACH(const uint256 ¬e_commitment, pour.commitments)
|
||||
{
|
||||
tree.append(bucket_commitment);
|
||||
tree.append(note_commitment);
|
||||
|
||||
BOOST_FOREACH(boost::optional<ZCIncrementalWitness>& wit, witnesses) {
|
||||
if (wit) {
|
||||
wit->append(bucket_commitment);
|
||||
wit->append(note_commitment);
|
||||
}
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
BOOST_FOREACH(uint256& commitment, commitments) {
|
||||
if (bucket_commitment == commitment) {
|
||||
if (note_commitment == commitment) {
|
||||
witnesses.at(i) = tree.witness();
|
||||
}
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user