Bucket -> note.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood
2016-07-14 23:22:27 +01:00
committed by Sean Bowe
parent cc01120a17
commit 4bc00dc141
5 changed files with 34 additions and 34 deletions

View File

@@ -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 &note_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++;