Test
This commit is contained in:
@@ -327,15 +327,20 @@ bool ProcessAssets(Eval* eval, std::vector<uint8_t> paramsNull,const CTransactio
|
||||
txid = ctx.GetHash();
|
||||
if ( txid == prevtxid )
|
||||
return(true);
|
||||
{ fprintf(stderr,"ProcessAssets\n");
|
||||
{
|
||||
fprintf(stderr,"ProcessAssets\n");
|
||||
if ( paramsNull.size() != 0 ) // Don't expect params
|
||||
return eval->Invalid("Cannot have params");
|
||||
else if ( (n= ctx.vout.size()) == 0 )
|
||||
fprintf(stderr,"ProcessAssets2\n");
|
||||
if ( (n= ctx.vout.size()) == 0 )
|
||||
return eval->Invalid("no-vouts");
|
||||
else if ( (funcid= DecodeAssetOpRet(ctx.vout[n-1].scriptPubKey,assetid,assetid2,amount,origpubkey)) == 0 )
|
||||
fprintf(stderr,"ProcessAssets3\n");
|
||||
if ( (funcid= DecodeAssetOpRet(ctx.vout[n-1].scriptPubKey,assetid,assetid2,amount,origpubkey)) == 0 )
|
||||
return eval->Invalid("Invalid opreturn payload");
|
||||
fprintf(stderr,"ProcessAssets4\n");
|
||||
if ( eval->GetTxUnconfirmed(assetid,createTx,hashBlock) == 0 )
|
||||
return eval->Invalid("cant find asset create txid");
|
||||
fprintf(stderr,"ProcessAssets5\n");
|
||||
if ( assetid2 != zero && eval->GetTxUnconfirmed(assetid2,createTx,hashBlock) == 0 )
|
||||
return eval->Invalid("cant find asset2 create txid");
|
||||
fprintf(stderr,"AssetValidate skipped\n");
|
||||
|
||||
@@ -87,8 +87,10 @@ bool Eval::GetSpendsConfirmed(uint256 hash, std::vector<CTransaction> &spends) c
|
||||
|
||||
bool Eval::GetTxUnconfirmed(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock) const
|
||||
{
|
||||
bool fAllowSlow = false; // Don't allow slow
|
||||
return GetTransaction(hash, txOut, hashBlock, fAllowSlow);
|
||||
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
||||
//bool fAllowSlow = false; // Don't allow slow
|
||||
//return GetTransaction(hash, txOut, hashBlock, fAllowSlow);
|
||||
return myGetTransaction(hash, txOut,hashBlock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user