Add HAC option to allow sending funds to the transparent burn address when -ac_private=1

This commit is contained in:
Duke
2025-04-29 14:52:25 -04:00
parent 157ff2f8db
commit d39503c13b
4 changed files with 17 additions and 4 deletions

View File

@@ -1520,11 +1520,16 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio
{
char destaddr[65];
Getscriptaddress(destaddr,txout.scriptPubKey);
if ( hush_isnotaryvout(destaddr,tiptime) == 0 )
{
invalid_private_taddr = 1;
fprintf(stderr,"%s: invalid taddr %s on private chain!\n", __func__, destaddr);
//return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain");
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);
} else {
invalid_private_taddr = 1;
fprintf(stderr,"%s: invalid taddr %s on private chain!\n", __func__, destaddr);
}
}
}
}