WIP donation test
This commit is contained in:
@@ -214,9 +214,9 @@ bool ShieldToAddress::operator()(const libzcash::SaplingPaymentAddress &zaddr) c
|
||||
m_op->builder_.AddTransparentInput(COutPoint(t.txid, t.vout), t.scriptPubKey, t.amount);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: TESTING zaddr only, only use on regtest
|
||||
//TODO: randomly select from a set
|
||||
auto dzaddr = "zs1...";
|
||||
auto dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4";
|
||||
auto donationZaddr = DecodePaymentAddress(dzaddr);
|
||||
if (!IsValidPaymentAddress(donationZaddr)) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid donation zaddr, Unknown address format: ") + dzaddr);
|
||||
@@ -233,7 +233,7 @@ bool ShieldToAddress::operator()(const libzcash::SaplingPaymentAddress &zaddr) c
|
||||
auto donationZout = boost::get<libzcash::SaplingPaymentAddress>(donationZaddr);
|
||||
m_op->builder_.AddSaplingOutput(ovk, donationZout, donationAmount);
|
||||
|
||||
fprintf(stderr,"%s: donation=%ld, sendAmount=%ld, donationAmount=%ld\n", __func__, donation, sendAmount, donationAmount);
|
||||
LogPrintf("%s: donation=%ld, sendAmount=%ld, donationAmount=%ld\n", __func__, donation, sendAmount, donationAmount);
|
||||
|
||||
// zdust as third output, so donation txs are indistinguishable from
|
||||
// non-donation z_shieldcoinbase txs
|
||||
|
||||
Reference in New Issue
Block a user