ac_private to allow notary p2pk bouts

This commit is contained in:
jl777
2018-09-21 23:29:00 -11:00
parent 1313ac253d
commit 0c2c564c24
2 changed files with 20 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ extern int32_t KOMODO_LOADINGBLOCKS,KOMODO_LONGESTCHAIN,KOMODO_INSYNC,KOMODO_CON
int32_t KOMODO_NEWBLOCKS;
int32_t komodo_block2pubkey33(uint8_t *pubkey33,CBlock *block);
void komodo_broadcast(CBlock *pblock,int32_t limit);
int32_t komodo_isnotaryvout(CScript scriptPubKey);
BlockMap mapBlockIndex;
CChain chainActive;
@@ -1119,7 +1120,10 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
{
fprintf(stderr,"private chain nValue %.8f iscoinbase.%d\n",(double)txout.nValue/COIN,iscoinbase);
if ( (txout.nValue > 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");