From 6a4d56a00a99fab3c2233e4573f04dda0c1bd062 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Apr 2017 14:41:14 +0300 Subject: [PATCH] Utxo test --- .gitignore | 10 ++++++++++ iguana/dpow/dpow_rpc.c | 9 +++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b775d5e60..c45ac00b2 100755 --- a/.gitignore +++ b/.gitignore @@ -220,3 +220,13 @@ iguana/confs/630929d976025fafde221c7358eb5805f4359bad3c6b8bd50ad3f6e0a9b5ce78 iguana/confs/5f3283a017c31e52443d61cb43944e2157f7c03eb12d701ebf4a35a695688e1f iguana/3193054754-2514575257 + +iguana/DB/SWAPS/2723832060-1788071166 + +*.alicepayment + +*.finished + +*.myfee + +iguana/DB/SWAPS/3213598586-2281632307 diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index f8ffded08..2fed337f6 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -772,7 +772,7 @@ int32_t dpow_vini_ismine(struct supernet_info *myinfo,struct dpow_info *dp,cJSON int32_t dpow_haveutxo(struct supernet_info *myinfo,struct iguana_info *coin,bits256 *txidp,int32_t *voutp,char *coinaddr) { - int32_t i,j,n,vout,haveutxo = 0; uint32_t r; bits256 txid; cJSON *unspents,*item; uint64_t satoshis; char *str,*address; uint8_t script[35]; + int32_t vout,haveutxo = 0; uint32_t i,j,n,r; bits256 txid; cJSON *unspents,*item; uint64_t satoshis; char *str,*address; uint8_t script[35]; memset(txidp,0,sizeof(*txidp)); *voutp = -1; if ( (unspents= dpow_listunspent(myinfo,coin,coinaddr)) != 0 ) @@ -788,9 +788,10 @@ int32_t dpow_haveutxo(struct supernet_info *myinfo,struct iguana_info *coin,bits "confirmations" : 4282, "spendable" : true },*/ - r = 0; - memcpy(&r,coin->symbol,3); - r = calc_crc32(0,(void *)&r,sizeof(r)); + //r = 0; + //memcpy(&r,coin->symbol,3); + //r = calc_crc32(0,(void *)&r,sizeof(r)); + OS_randombytes((uint8_t *)&r,sizeof(r)); for (j=0; j