jl777 8 years ago
parent
commit
f595c76b23
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 4
      iguana/dpow/dpow_tx.c
  3. 4
      iguana/main.c

2
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) 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 ) if ( channel == DPOW_UTXOCHANNEL || channel == DPOW_UTXOBTCCHANNEL )
{ {
memset(&E,0,sizeof(E)); memset(&E,0,sizeof(E));

4
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) 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; m = 0;
if ( (jsonstr= dpow_signrawtransaction(myinfo,coin,rawtx,vins)) != 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); } else printf("error parsing.(%s)\n",jsonstr);
free(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) 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)

4
iguana/main.c

@ -1587,8 +1587,8 @@ void iguana_main(void *arg)
libgfshare_init(myinfo,myinfo->logs,myinfo->exps); libgfshare_init(myinfo,myinfo->logs,myinfo->exps);
myinfo->rpcport = IGUANA_RPCPORT; myinfo->rpcport = IGUANA_RPCPORT;
myinfo->DPOW.sock = -1; myinfo->DPOW.sock = -1;
//myinfo->rpcport = IGUANA_NOTARYPORT; myinfo->rpcport = IGUANA_NOTARYPORT;
//myinfo->IAMNOTARY = 1; myinfo->IAMNOTARY = 1;
if ( arg != 0 ) if ( arg != 0 )
{ {
if ( strcmp((char *)arg,"OStests") == 0 ) if ( strcmp((char *)arg,"OStests") == 0 )

Loading…
Cancel
Save