Browse Source

Test

etomic
jl777 8 years ago
parent
commit
13e29b20ff
  1. 2
      basilisk/basilisk_swap.c
  2. 4
      iguana/iguana_payments.c
  3. 8
      iguana/iguana_sign.c
  4. 6
      iguana/iguana_unspents.c

2
basilisk/basilisk_swap.c

@ -352,7 +352,7 @@ int32_t _basilisk_rawtx_sign(struct supernet_info *myinfo,int32_t height,uint32_
needsig = 0; needsig = 0;
#endif #endif
} }
printf("rawtx B\n"); //printf("rawtx B\n");
if ( bits256_nonz(rawtx->I.actualtxid) != 0 ) if ( bits256_nonz(rawtx->I.actualtxid) != 0 )
jaddbits256(item,"txid",rawtx->I.actualtxid); jaddbits256(item,"txid",rawtx->I.actualtxid);
else jaddbits256(item,"txid",rawtx->I.signedtxid); else jaddbits256(item,"txid",rawtx->I.signedtxid);

4
iguana/iguana_payments.c

@ -175,7 +175,7 @@ int32_t iguana_RTbestunspent(struct supernet_info *myinfo,struct iguana_info *co
} }
if ( iguana_RTunspent_check(myinfo,coin,unspents[i]) != 0 ) if ( iguana_RTunspent_check(myinfo,coin,unspents[i]) != 0 )
{ {
printf("(%d u%d) %.8f already used\n",unspents[i].hdrsi,unspents[i].unspentind,dstr(atx_value)); //printf("(%d u%d) %.8f already used\n",unspents[i].hdrsi,unspents[i].unspentind,dstr(atx_value));
continue; continue;
} }
if ( maxmode == 0 ) if ( maxmode == 0 )
@ -289,7 +289,7 @@ char *iguana_signrawtx(struct supernet_info *myinfo,struct iguana_info *coin,int
if ( flag != 0 ) if ( flag != 0 )
free_json(privkeys); free_json(privkeys);
} }
char str[65]; printf("completed.%d %s signed.(%s)\n",*completedp,bits256_str(str,*signedtxidp),signedtx!=0?signedtx:""); //char str[65]; printf("completed.%d %s signed.(%s)\n",*completedp,bits256_str(str,*signedtxidp),signedtx!=0?signedtx:"");
return(signedtx); return(signedtx);
} }

8
iguana/iguana_sign.c

@ -687,7 +687,7 @@ int32_t iguana_rwmsgtx(struct iguana_info *coin,int32_t height,int32_t rwflag,cJ
{ {
iguana_vinobjset(&msg->vins[i],jitem(vins,i),spendscript,sizeof(spendscript)); iguana_vinobjset(&msg->vins[i],jitem(vins,i),spendscript,sizeof(spendscript));
sigtxid = bitcoin_sigtxid(coin,height,sigser,maxsize*2,msg,i,msg->vins[i].spendscript,msg->vins[i].spendlen,SIGHASH_ALL,vpnstr,suppress_pubkeys); sigtxid = bitcoin_sigtxid(coin,height,sigser,maxsize*2,msg,i,msg->vins[i].spendscript,msg->vins[i].spendlen,SIGHASH_ALL,vpnstr,suppress_pubkeys);
printf("after vini.%d vinscript.%p spendscript.%p spendlen.%d (%s)\n",i,msg->vins[i].vinscript,msg->vins[i].spendscript,msg->vins[i].spendlen,jprint(jitem(vins,i),0)); //printf("after vini.%d vinscript.%p spendscript.%p spendlen.%d (%s)\n",i,msg->vins[i].vinscript,msg->vins[i].spendscript,msg->vins[i].spendlen,jprint(jitem(vins,i),0));
jaddi(vinarray,iguana_vinjson(coin,&msg->vins[i],sigtxid)); jaddi(vinarray,iguana_vinjson(coin,&msg->vins[i],sigtxid));
if ( msg->vins[i].spendscript == spendscript ) if ( msg->vins[i].spendscript == spendscript )
msg->vins[i].spendscript = 0; msg->vins[i].spendscript = 0;
@ -1013,13 +1013,13 @@ int32_t bitcoin_verifyvins(struct iguana_info *coin,int32_t height,bits256 *sign
{ {
flag++; flag++;
numsigs++; numsigs++;
int32_t z; /*int32_t z;
for (z=0; z<siglen-1; z++) for (z=0; z<siglen-1; z++)
printf("%02x",sig[z]); printf("%02x",sig[z]);
printf(" <- sig[%d]\n",j); printf(" <- sig[%d]\n",j);
for (z=0; z<33; z++) for (z=0; z<33; z++)
printf("%02x",vp->signers[j].pubkey[z]); printf("%02x",vp->signers[j].pubkey[z]);
printf(" <- pub, SIG.%d.%d VERIFIED numsigs.%d vs M.%d\n",vini,j,numsigs,vp->M); printf(" <- pub, SIG.%d.%d VERIFIED numsigs.%d vs M.%d\n",vini,j,numsigs,vp->M);*/
} }
} }
if ( numsigs >= vp->M ) if ( numsigs >= vp->M )
@ -1435,7 +1435,7 @@ int32_t iguana_signrawtransaction(struct supernet_info *myinfo,struct iguana_inf
} }
} }
} }
printf("type.%d p2sh.[%d] -> %s M.%d N.%d\n",type,i,mvin.coinaddr,mvin.M,mvin.N); //printf("type.%d p2sh.[%d] -> %s M.%d N.%d\n",type,i,mvin.coinaddr,mvin.M,mvin.N);
} }
} }
if ( i < V->N ) if ( i < V->N )

6
iguana/iguana_unspents.c

@ -913,7 +913,7 @@ void iguana_unspents_mark(struct supernet_info *myinfo,struct iguana_info *coin,
{ {
if ( firstslot >= 0 ) if ( firstslot >= 0 )
{ {
printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,txid),vout); //printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,txid),vout);
coin->markedunspents[firstslot] = txid; coin->markedunspents[firstslot] = txid;
coin->markedunspents[firstslot].ushorts[15] = vout; coin->markedunspents[firstslot].ushorts[15] = vout;
if ( (0) && coin->utxofp == 0 ) if ( (0) && coin->utxofp == 0 )
@ -949,7 +949,7 @@ return;
{ {
if ( firstslot >= 0 ) if ( firstslot >= 0 )
{ {
char str[65]; printf("%s slot.[%d] <- %s/v%d\n",fname,firstslot,bits256_str(str,filetxid),filevout); //char str[65]; printf("%s slot.[%d] <- %s/v%d\n",fname,firstslot,bits256_str(str,filetxid),filevout);
coin->markedunspents[firstslot] = filetxid; coin->markedunspents[firstslot] = filetxid;
coin->markedunspents[firstslot].ushorts[15] = filevout; coin->markedunspents[firstslot].ushorts[15] = filevout;
} }
@ -975,7 +975,7 @@ return;
{ {
if ( firstslot >= 0 ) if ( firstslot >= 0 )
{ {
char str[65]; printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,filetxid),filevout); //char str[65]; printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,filetxid),filevout);
coin->markedunspents[firstslot] = filetxid; coin->markedunspents[firstslot] = filetxid;
coin->markedunspents[firstslot].ushorts[15] = filevout; coin->markedunspents[firstslot].ushorts[15] = filevout;
} }

Loading…
Cancel
Save