From 3c1ba6e868439d326e5ac774d33a5ccd19a91beb Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Nov 2016 10:22:12 -0300 Subject: [PATCH] test --- iguana/dPoW.h | 2 +- iguana/dpow/dpow_tx.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index ea781d664..7aa73b1ab 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -19,7 +19,7 @@ #define DPOW_FIRSTRATIFY 1000 #define DPOW_CHECKPOINTFREQ 10 -#define DPOW_MINSIGS 17 //((height < 90000) ? 7 : 11) +#define DPOW_MINSIGS 2 //((height < 90000) ? 7 : 11) //#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1) #define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries) #define DPOW_VERSION 0x0769 diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 9dc6f0106..80f289e1c 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -387,7 +387,7 @@ cJSON *dpow_vins(struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uin void dpow_rawtxsign(struct supernet_info *myinfo,struct dpow_info *dp,struct iguana_info *coin,struct dpow_block *bp,char *rawtx,cJSON *vins,int8_t bestk,uint64_t bestmask,int32_t myind,int32_t src_or_dest) { - int32_t j,m=0,retval=-1; char *jsonstr,*signedtx,*rawtx2,*sigstr,*pubstr; cJSON *signobj,*sobj,*txobj2,*item,*vin; uint8_t pubkey33[33]; bits256 srchash; struct dpow_entry *ep; struct dpow_coinentry *cp; + int32_t j,m=0,retval=-1; char *jsonstr,*signedtx,*rawtx2,*sigstr,*pubstr; cJSON *signobj,*vinitem,*sobj,*txobj2,*item,*vin; uint8_t pubkey33[33]; bits256 srchash; struct dpow_entry *ep; struct dpow_coinentry *cp; if ( bestk < 0 ) return; for (j=0; j 32 ) { - if ( (pubstr= jstr(item,"scriptPubkey")) != 0 && is_hexstr(pubstr,0) == 66 ) + if ( (pubstr= jstr(vinitem,"scriptPubkey")) != 0 && is_hexstr(pubstr,0) == 66 ) { decode_hex(pubkey33,33,&pubstr[1]); if ( memcmp(pubkey33,dp->minerkey33,33) == 0 ) @@ -426,8 +427,8 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct dpow_info *dp,struct igu dpow_sigsend(myinfo,dp,bp,myind,bestk,bestmask,srchash,src_or_dest != 0 ? DPOW_SIGBTCCHANNEL : DPOW_SIGCHANNEL); retval = 0; break; - } else printf("sig didnt match pubkey? (%s)\n",jprint(item,0)); - } else printf("no scriptPubkey.(%s)\n",jprint(item,0)); + } else printf("sig didnt match pubkey? (%s)\n",jprint(vinitem,0)); + } else printf("no scriptPubkey.(%s)\n",jprint(vinitem,0)); } // else printf("notmine.(%s)\n",jprint(item,0)); } } else printf("no vin[] (%s)\n",jprint(txobj2,0));