Set a mainnet donation zaddr for z_shieldcoinbase

This commit is contained in:
duke
2026-02-11 11:11:50 -05:00
parent cf9bacf4e7
commit f26f27656a

View File

@@ -219,9 +219,13 @@ bool ShieldToAddress::operator()(const libzcash::SaplingPaymentAddress &zaddr) c
if(donation) {
//if donation>0, send X% of value to zaddr and Y% of of value to donatezaddr where X+Y=100%
//TODO: TESTING zaddr only, only use on regtest
//TODO: randomly select from a set
auto dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4";
auto dzaddr = "";
if(Params().NetworkIDString() == "regtest") {
dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4";
} else {
//TODO: randomly select from a set
dzaddr = "zs1uhmry4jjaymhh2x7x53fkahp57u60qr54ydtcd6c2nzu73lgm78a4kml2x7ylm547hu2qqtsnw5";
}
auto donationZaddr = DecodePaymentAddress(dzaddr);
if (!IsValidPaymentAddress(donationZaddr)) {
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid donation zaddr, Unknown address format: ") + dzaddr);