From f595c76b233bd98bab234e71e80809b6241243ed Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 14 Oct 2016 14:00:27 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 2 +- iguana/dpow/dpow_tx.c | 4 +--- iguana/main.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index b7f4bb43b..9fa5f6404 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -61,7 +61,7 @@ void dpow_sync(struct supernet_info *myinfo,struct dpow_block *bp,uint64_t refma void dpow_datahandler(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t channel,uint32_t height,uint8_t *data,int32_t datalen) { - bits256 hashmsg,txid,commit,srchash; uint32_t flag = 0; uint64_t mask; int8_t lastk; int32_t senderind,i,vout,len,myind = -1; char str[65],str2[65]; uint8_t utxodata[1024]; struct dpow_sigentry dsig; struct dpow_entry *ep,E; + bits256 hashmsg,txid,commit,srchash; uint32_t flag = 0; int32_t senderind,i,vout,myind = -1; char str[65],str2[65]; struct dpow_sigentry dsig; struct dpow_entry *ep,E; if ( channel == DPOW_UTXOCHANNEL || channel == DPOW_UTXOBTCCHANNEL ) { memset(&E,0,sizeof(E)); diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 2f01a2c7e..8a45bcb80 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -178,7 +178,7 @@ cJSON *dpow_vins(struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uin void dpow_rawtxsign(struct supernet_info *myinfo,struct iguana_info *coin,struct dpow_block *bp,char *rawtx,cJSON *vins,int8_t bestk,uint64_t bestmask,int32_t myind,uint32_t sigchannel) { - int32_t j,m=0,flag=0,retval=-1; char *jsonstr,*signedtx,*rawtx2,*sigstr; cJSON *signobj,*sobj,*txobj2,*item,*vin; bits256 srchash; struct dpow_entry *ep = &bp->notaries[myind]; + int32_t j,m=0,retval=-1; char *jsonstr,*signedtx,*rawtx2,*sigstr; cJSON *signobj,*sobj,*txobj2,*item,*vin; bits256 srchash; struct dpow_entry *ep = &bp->notaries[myind]; m = 0; if ( (jsonstr= dpow_signrawtransaction(myinfo,coin,rawtx,vins)) != 0 ) { @@ -216,8 +216,6 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct iguana_info *coin,struct } else printf("error parsing.(%s)\n",jsonstr); free(jsonstr); } - if ( flag != 0 && vins != 0 ) - free_json(vins); } int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uint64_t bestmask,int32_t myind,char *opret_symbol,uint32_t sigchannel) diff --git a/iguana/main.c b/iguana/main.c index 1a420c07d..2d6bd6bad 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1587,8 +1587,8 @@ void iguana_main(void *arg) libgfshare_init(myinfo,myinfo->logs,myinfo->exps); myinfo->rpcport = IGUANA_RPCPORT; myinfo->DPOW.sock = -1; -//myinfo->rpcport = IGUANA_NOTARYPORT; -//myinfo->IAMNOTARY = 1; +myinfo->rpcport = IGUANA_NOTARYPORT; +myinfo->IAMNOTARY = 1; if ( arg != 0 ) { if ( strcmp((char *)arg,"OStests") == 0 )