Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e596b905fb
  1. 1
      basilisk/basilisk_swap.c
  2. 4
      iguana/iguana_interpreter.c
  3. 1
      iguana/iguana_payments.c
  4. 2
      iguana/iguana_unspents.c
  5. 2
      iguana/tests/decoderawtransaction

1
basilisk/basilisk_swap.c

@ -222,6 +222,7 @@ int32_t basilisk_rawtx_sign(struct supernet_info *myinfo,struct basilisk_swap *s
init_hexbytes_noT(hexstr,rawtx->spendscript,rawtx->spendlen);
jaddstr(sobj,"hex",hexstr);
jadd(item,"scriptPubKey",sobj);
jaddnum(item,"suppress",dest->suppress_pubkeys);
if ( locktime != 0 )
jaddnum(item,"sequence",0);
if ( (dest->redeemlen= rawtx->redeemlen) != 0 )

4
iguana/iguana_interpreter.c

@ -1017,8 +1017,8 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip
if ( V->suppress_pubkeys == 0 && (V->spendscript[0] != plen || V->spendscript[V->spendlen - 1] != IGUANA_OP_CHECKSIG || bitcoin_pubkeylen(&V->spendscript[1]) <= 0) )
{
iguana_pushdata(stacks,0,V->signers[i].pubkey,plen);
//printf("pushdata plen.%d depth.%d\n",plen,stacks->stackdepth);
} //else printf("skip pubkey push %d script[0].%d spendlen.%d depth.%d\n",plen,V->spendscript[0],V->spendlen,stacks->stackdepth);
printf(">>>>>>>>> suppress.%d pushdata plen.%d depth.%d\n",V->suppress_pubkeys,plen,stacks->stackdepth);
} else printf("<<<<<<<<<< skip pubkey push %d script[0].%d spendlen.%d depth.%d\n",plen,V->spendscript[0],V->spendlen,stacks->stackdepth);
}
}
if ( V->userdatalen != 0 )

1
iguana/iguana_payments.c

@ -940,6 +940,7 @@ char *iguana_validaterawtx(struct supernet_info *myinfo,struct iguana_info *coin
//printf("V %.8f (%s) spendscript.[%d] scriptlen.%d\n",dstr(V[i].amount),V[i].coinaddr,V[i].spendlen,V[i].spendlen);
}
}
V[0].suppress_pubkeys = suppress_pubkeys;
if ( (complete= bitcoin_verifyvins(coin,&signedtxid,&signedtx,msgtx,serialized2,maxsize,V,1,0,suppress_pubkeys)) > 0 && signedtx != 0 )
{
msgtx->txid = signedtxid;

2
iguana/iguana_unspents.c

@ -529,7 +529,7 @@ int64_t iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJ
//portable_mutex_lock(&coin->RTmutex);
while ( coin->RTramchain_busy != 0 )
{
fprintf(stderr,"iguana_pkhasharray: unexpected access when RTramchain_busy\n");
fprintf(stderr,"iguana_pkhasharray: %s unexpected access when RTramchain_busy\n",coin->symbol);
sleep(1);
}
numunspents = 0;

2
iguana/tests/decoderawtransaction

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"01000000da9fa4570175ea2861981d895188b777551fffb07098dd5c53742c796e5905652181b478eb00000000d6483045022100c41f44d34a87cb6ccee6b266173c5e5f007e1d182027d99a7fe23d8bd8e5209f022074926d0650759aa020f0eac7548e627beb040b76d6cc86386a8edc1af1610a9001483045022100fedac947dd4a674228bbf3ba6acd0c6b188608f001dbe8f812d6619642d84dbe022055cc276dc2bd64b20184d3458298e50a43bf592b47b818ec4b074df95efaa7a101210201f76dba39941225e8615c0b53fc6927595b4b4d13e87146a94f08013a66386421032e81aa7e50e5c524cf5480ba2786ac8d7dc26f1ac9be6d56fb009c4e7588fedcffffffff01706f9800000000001976a91454a752f0d71b89d7c014ed0be29ca231c9546f9f88ac00000000\"]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"010000000ab4a457019668ae0c9cb7b54351015893e45f94cd1b59b8ebc53f7f410ace79e50d82812700000000d547304402202bf1b52f1dafc82f022e53ca6fc02c1d1b512a6d80a29ca8e40c7ae20a149433022019912bdf6942398d87dcbf03d2042a082ac4b4aff3f5865767faf90b94b4ae6901483045022100f04bd1f5f783e0c857e0cbcf0f7cd8a987c8d8bd6df90b370fc2b1ea5ed37d0e0220269d8744786567b5511fcadcf67fe0f352c49be644c5f4d9118b7667d25bfe3b012102b64e7a2e75d18b9d220a6d59840e433d3028951d3b68fa53446cae8ee644030221034e59dd68726514acbff46e90881e7914b5bdecef244f033311d39006e2ce23baffffffff01706f9800000000001976a91454a752f0d71b89d7c014ed0be29ca231c9546f9f88ac00000000\"]}"

Loading…
Cancel
Save