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
|
bool CCoinsViewCache::HaveJoinSplitRequirements(const CTransaction& tx) const
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
boost::unordered_map<uint256, SproutMerkleTree, CCoinsKeyHasher> intermediates;
|
boost::unordered_map<uint256, SproutMerkleTree, CCoinsKeyHasher> intermediates;
|
||||||
|
|
||||||
BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit)
|
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));
|
intermediates.insert(std::make_pair(tree.root(), tree));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for (const SpendDescription &spendDescription : tx.vShieldedSpend) {
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
SaplingMerkleTree tree;
|
SaplingMerkleTree tree;
|
||||||
if (!GetSaplingAnchorAt(spendDescription.anchor, tree)) {
|
if (!GetSaplingAnchorAt(spendDescription.anchor, tree)) {
|
||||||
|
fprintf(stderr,"%s: missing Sapling anchor!",__FUNCTION__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -863,6 +863,7 @@ void CTxMemPool::NotifyRecentlyAdded()
|
|||||||
try {
|
try {
|
||||||
SyncWithWallets(tx, NULL);
|
SyncWithWallets(tx, NULL);
|
||||||
} catch (const boost::thread_interrupted&) {
|
} catch (const boost::thread_interrupted&) {
|
||||||
|
fprintf(stderr,"%s: thread interrupted\n");
|
||||||
throw;
|
throw;
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
PrintExceptionContinue(&e, "CTxMemPool::NotifyRecentlyAdded()");
|
PrintExceptionContinue(&e, "CTxMemPool::NotifyRecentlyAdded()");
|
||||||
|
|||||||
@@ -4533,6 +4533,18 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
|||||||
|
|
||||||
nTotalOut += nAmount;
|
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;
|
int nextBlockHeight = chainActive.Height() + 1;
|
||||||
CMutableTransaction mtx;
|
CMutableTransaction mtx;
|
||||||
|
|||||||
Reference in New Issue
Block a user