Rename Witnesses to include sprout or sapling

This commit is contained in:
Eirik Ogilvie-Wigley
2018-08-01 10:41:36 -06:00
parent 4fc309f0f5
commit 8ea8ef9850
14 changed files with 66 additions and 66 deletions

View File

@@ -1470,7 +1470,7 @@ bool CWallet::IsFromMe(const uint256& nullifier) const
}
void CWallet::GetSproutNoteWitnesses(std::vector<JSOutPoint> notes,
std::vector<boost::optional<ZCIncrementalWitness>>& witnesses,
std::vector<boost::optional<SproutWitness>>& witnesses,
uint256 &final_anchor)
{
LOCK(cs_wallet);
@@ -1497,7 +1497,7 @@ void CWallet::GetSproutNoteWitnesses(std::vector<JSOutPoint> notes,
}
void CWallet::GetSaplingNoteWitnesses(std::vector<SaplingOutPoint> notes,
std::vector<boost::optional<ZCSaplingIncrementalWitness>>& witnesses,
std::vector<boost::optional<SaplingWitness>>& witnesses,
uint256 &final_anchor)
{
LOCK(cs_wallet);
@@ -1888,7 +1888,7 @@ bool CWalletTx::WriteToDisk(CWalletDB *pwalletdb)
}
void CWallet::WitnessNoteCommitment(std::vector<uint256> commitments,
std::vector<boost::optional<ZCIncrementalWitness>>& witnesses,
std::vector<boost::optional<SproutWitness>>& witnesses,
uint256 &final_anchor)
{
witnesses.resize(commitments.size());
@@ -1907,7 +1907,7 @@ void CWallet::WitnessNoteCommitment(std::vector<uint256> commitments,
{
tree.append(note_commitment);
BOOST_FOREACH(boost::optional<ZCIncrementalWitness>& wit, witnesses) {
BOOST_FOREACH(boost::optional<SproutWitness>& wit, witnesses) {
if (wit) {
wit->append(note_commitment);
}
@@ -1937,7 +1937,7 @@ void CWallet::WitnessNoteCommitment(std::vector<uint256> commitments,
// TODO: #93; Select a root via some heuristic.
final_anchor = tree.root();
BOOST_FOREACH(boost::optional<ZCIncrementalWitness>& wit, witnesses) {
BOOST_FOREACH(boost::optional<SproutWitness>& wit, witnesses) {
if (wit) {
assert(final_anchor == wit->root());
}