diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 4711a9afc..b619c5b29 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -198,6 +198,21 @@ const char *Notaries_elected1[][2] = {"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" }, }; +int32_t komodo_isnotaryvout(CScript scriptPubKey) // from ac_private chains only +{ + uint8_t pubkey33[33],*ptr = scriptPubKey.data(); int32_t i; + if ( scriptPubKey.size() == 35 && ptr[0] == 33 && ptr[34] == 0xac ) + { + for (i=0; i 0 && iscoinbase == 0) || tx.GetJoinSplitValueOut() > 0 ) - return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain"); + { + if ( komodo_isnotaryvout(txout.scriptPubKey) == 0 ) + return state.DoS(100, error("CheckTransaction(): this is a private chain, no public allowed"),REJECT_INVALID, "bad-txns-acprivacy-chain"); + } } if ( txout.scriptPubKey.size() > IGUANA_MAXSCRIPTSIZE ) return state.DoS(100, error("CheckTransaction(): txout.scriptPubKey.size() too big"),REJECT_INVALID, "bad-txns-vout-negative");