Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
311bd25ebc
  1. 7
      iguana/iguana_interpreter.c
  2. 15
      iguana/iguana_sign.c

7
iguana/iguana_interpreter.c

@ -1549,7 +1549,12 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip
if ( errs == 0 )
jadd(interpreter,"result",jtrue());
else jadd(interpreter,"result",jfalse());
} else printf("Evaluate FALSE, depth.%d errs.%d\n",stacks->stackdepth,errs);
}
else
{
jadd(interpreter,"result",jfalse());
printf("Evaluate FALSE, depth.%d errs.%d\n",stacks->stackdepth,errs);
}
//if ( stacks->logarray != 0 )
// printf("LOG.(%s)\n",jprint(stacks->logarray,0));
if ( numargs > 0 )

15
iguana/iguana_sign.c

@ -753,11 +753,15 @@ int32_t iguana_msgtx_Vset(struct iguana_info *coin,uint8_t *serialized,int32_t m
{
p2shlen = vp->p2shlen = msgtx->vins[vini].p2shlen;
redeemscript = msgtx->vins[vini].redeemscript;
} else redeemscript = vp->p2shscript;
}
else
{
redeemscript = vp->p2shscript;
msgtx->vins[vini].redeemscript = redeemscript;
}
printf("USERDATALEN.%d scriptlen.%d redeemlen.%d\n",userdatalen,scriptlen,p2shlen);
if ( p2shlen != 0 )
{
msgtx->vins[vini].redeemscript = &script[scriptlen];
if ( p2shlen < 76 )
script[scriptlen++] = p2shlen;
else if ( p2shlen <= 0xff )
@ -777,6 +781,11 @@ int32_t iguana_msgtx_Vset(struct iguana_info *coin,uint8_t *serialized,int32_t m
}
len += scriptlen;
}
{
int32_t i; for (i=0; i<len; i++)
printf("%02x",script[i]);
printf(" <-script len.%d\n",len);
}
return(len);
}
@ -839,7 +848,7 @@ int32_t bitcoin_verifyvins(struct iguana_info *coin,int32_t height,bits256 *sign
if ( numsigs >= vp->M )
complete = 1;
}
}
} //0398a4cb9f6ea7c52a4e27455028a95e2e4e397a110fb75f072c2c58a8bdcb
iguana_msgtx_Vset(coin,serialized,maxlen,msgtx,V);
cJSON *txobj = cJSON_CreateObject();
*signedtx = iguana_rawtxbytes(coin,height,txobj,msgtx,suppress_pubkeys);

Loading…
Cancel
Save