This commit is contained in:
jl777
2016-11-21 17:47:23 -03:00
parent a2829a0c45
commit cc0f93da2e
2 changed files with 12 additions and 5 deletions

View File

@@ -676,14 +676,18 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
txnouttype whichType; txnouttype whichType;
BOOST_FOREACH(const CTxOut& txout, tx.vout) BOOST_FOREACH(const CTxOut& txout, tx.vout)
{ {
if (!::IsStandard(txout.scriptPubKey, whichType)) { if (!::IsStandard(txout.scriptPubKey, whichType))
reason = "scriptpubkey"; {
fprintf(stderr,"vout.%d nDataout.%d\n",v,nDataOut); reason = "scriptpubkeyA";
fprintf(stderr,">>>>>>>>>>>>>>> vout.%d nDataout.%d\n",v,nDataOut);
return false; return false;
} }
if (whichType == TX_NULL_DATA) if (whichType == TX_NULL_DATA)
{
nDataOut++; nDataOut++;
fprintf(stderr,"is OP_RETURN\n");
}
else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) { else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
reason = "bare-multisig"; reason = "bare-multisig";
return false; return false;

View File

@@ -143,9 +143,11 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
else if (opcode2 == OP_SMALLDATA) else if (opcode2 == OP_SMALLDATA)
{ {
// small pushdata, <= nMaxDatacarrierBytes // small pushdata, <= nMaxDatacarrierBytes
fprintf(stderr,"size.%d > nMaxDatacarrier.%d\n",(int32_t)vch1.size(),(int32_t)nMaxDatacarrierBytes);
if (vch1.size() > nMaxDatacarrierBytes) if (vch1.size() > nMaxDatacarrierBytes)
{
fprintf(stderr,"size.%d > nMaxDatacarrier.%d\n",(int32_t)vch1.size(),(int32_t)nMaxDatacarrierBytes);
break; break;
}
} }
else if (opcode1 != opcode2 || vch1 != vch2) else if (opcode1 != opcode2 || vch1 != vch2)
{ {
@@ -203,7 +205,8 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
if (m < 1 || m > n) if (m < 1 || m > n)
return false; return false;
} }
if ( whichtype == TX_NONSTANDARD )
fprintf(stderr,"IsStandard nonstandard tx\n");
return whichType != TX_NONSTANDARD; return whichType != TX_NONSTANDARD;
} }