-ac_burn=1 requires a z2t tx, -ac_burn=2 does not

This commit is contained in:
Duke
2025-05-06 00:31:13 -04:00
parent d39503c13b
commit 080092a16d

View File

@@ -1524,8 +1524,12 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio
if ( hush_isnotaryvout(destaddr,tiptime) == 0 )
{
const bool isburn = (strcmp(destaddr,BURN_ADDRESS) == 0);
if (ASSETCHAINS_BURN && isburn) {
fprintf(stderr,"%s: allowing burn address %s on private chain because ac_burn != 0\n", __func__, destaddr);
if ((ASSETCHAINS_BURN == 1) && isburn && tx.vin.empty()) {
// -ac_burn=1 means only zaddrs can send to the burn address
fprintf(stderr,"%s: allowing zaddr to send to burn address %s on private chain because ac_burn=1\n", __func__, destaddr);
} else if ((ASSETCHAINS_BURN == 2) && isburn) {
// -ac_burn=2 allows notary taddrs to send directly to the burn address
fprintf(stderr,"%s: allowing burn address %s on private chain because ac_burn=2\n", __func__, destaddr);
} else {
invalid_private_taddr = 1;
fprintf(stderr,"%s: invalid taddr %s on private chain!\n", __func__, destaddr);