wip
This commit is contained in:
@@ -622,6 +622,7 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
|
||||
|
||||
bool CCoinsViewCache::HaveJoinSplitRequirements(const CTransaction& tx) const
|
||||
{
|
||||
/*
|
||||
boost::unordered_map<uint256, SproutMerkleTree, CCoinsKeyHasher> intermediates;
|
||||
|
||||
BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit)
|
||||
@@ -650,13 +651,17 @@ bool CCoinsViewCache::HaveJoinSplitRequirements(const CTransaction& tx) const
|
||||
|
||||
intermediates.insert(std::make_pair(tree.root(), tree));
|
||||
}
|
||||
*/
|
||||
|
||||
for (const SpendDescription &spendDescription : tx.vShieldedSpend) {
|
||||
if (GetNullifier(spendDescription.nullifier, SAPLING)) // Prevent double spends
|
||||
if (GetNullifier(spendDescription.nullifier, SAPLING)) { // Prevent double spends
|
||||
fprintf(stderr,"%s: existing nullifier!",__FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
SaplingMerkleTree tree;
|
||||
if (!GetSaplingAnchorAt(spendDescription.anchor, tree)) {
|
||||
fprintf(stderr,"%s: missing Sapling anchor!",__FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -863,6 +863,7 @@ void CTxMemPool::NotifyRecentlyAdded()
|
||||
try {
|
||||
SyncWithWallets(tx, NULL);
|
||||
} catch (const boost::thread_interrupted&) {
|
||||
fprintf(stderr,"%s: thread interrupted\n");
|
||||
throw;
|
||||
} catch (const std::exception& e) {
|
||||
PrintExceptionContinue(&e, "CTxMemPool::NotifyRecentlyAdded()");
|
||||
|
||||
@@ -4533,6 +4533,18 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
||||
|
||||
nTotalOut += nAmount;
|
||||
}
|
||||
// Byrsa: Add some magic privacy zdust
|
||||
unsigned int MIN_ZOUTS=7;
|
||||
while (zaddrRecipients.size() < MIN_ZOUTS) {
|
||||
int nAmount = 0;
|
||||
string memo = "f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
|
||||
|
||||
// TODO: options for address: hardcoded or randomized, unspendable or valid
|
||||
// We will send various amount=0 to this wallet if our amount of zdust
|
||||
// is below threshold, otherwise to unspendable or fixed out-of-wallet zaddrs
|
||||
string address = "zs1aq4xnrkjlnxx0zesqye7jz3dfrf3rjh7q5z6u8l6mwyqqaam3gx3j2fkqakp33v93yavq46j83q"; // duke donation zaddr
|
||||
zaddrRecipients.push_back( SendManyRecipient(address, nAmount, memo) );
|
||||
}
|
||||
|
||||
int nextBlockHeight = chainActive.Height() + 1;
|
||||
CMutableTransaction mtx;
|
||||
|
||||
Reference in New Issue
Block a user