From e596b905fb0dd12f0e1e061c383a69b669b044bd Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 5 Aug 2016 13:13:49 -0300 Subject: [PATCH] test --- basilisk/basilisk_swap.c | 1 + iguana/iguana_interpreter.c | 4 ++-- iguana/iguana_payments.c | 1 + iguana/iguana_unspents.c | 2 +- iguana/tests/decoderawtransaction | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 1bbf661d9..9a2af1661 100755 --- a/basilisk/basilisk_swap.c +++ b/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 ) diff --git a/iguana/iguana_interpreter.c b/iguana/iguana_interpreter.c index f21215d54..e3bb580fa 100755 --- a/iguana/iguana_interpreter.c +++ b/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 ) diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index 3ab1cfdf9..218266262 100755 --- a/iguana/iguana_payments.c +++ b/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; diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index b2e12a219..c871c8508 100755 --- a/iguana/iguana_unspents.c +++ b/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; diff --git a/iguana/tests/decoderawtransaction b/iguana/tests/decoderawtransaction index cd8ebc096..08d658954 100755 --- a/iguana/tests/decoderawtransaction +++ b/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\"]}"