jl777 8 years ago
parent
commit
edbe0d8efe
  1. 10
      basilisk/basilisk_swap.c
  2. 6
      iguana/iguana_unspents.c

10
basilisk/basilisk_swap.c

@ -761,9 +761,17 @@ int32_t basilisk_rawtx_gen(char *str,struct supernet_info *myinfo,int32_t iambob
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
if ( (retval= basilisk_rawtx_return(myinfo,rawtx->coin->blocks.hwmchain.height,rawtx,jitem(retarray,i),lockinputs,V)) == 0 ) if ( (retval= basilisk_rawtx_return(myinfo,rawtx->coin->blocks.hwmchain.height,rawtx,jitem(retarray,i),lockinputs,V)) == 0 )
{
rawtx->vins = jobj(jitem(retarray,i),"vins");
break; break;
}
} }
} else retval = basilisk_rawtx_return(myinfo,rawtx->coin->blocks.hwmchain.height,rawtx,retarray,lockinputs,V); }
else
{
retval = basilisk_rawtx_return(myinfo,rawtx->coin->blocks.hwmchain.height,rawtx,retarray,lockinputs,V);
rawtx->vins = jobj(retarray,"vins");
}
free(retarray); free(retarray);
} else printf("error parsing.(%s)\n",retstr); } else printf("error parsing.(%s)\n",retstr);
free(retstr); free(retstr);

6
iguana/iguana_unspents.c

@ -865,7 +865,7 @@ int32_t iguana_markedunspents_find(struct iguana_info *coin,int32_t *firstslotp,
void iguana_unspents_mark(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *vins) void iguana_unspents_mark(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *vins)
{ {
int32_t i,n,firstslot; int16_t vout; cJSON *item; bits256 txid; int32_t i,n,firstslot; int16_t vout; cJSON *item; bits256 txid; char str[65];
if ( (n= cJSON_GetArraySize(vins)) > 0 ) if ( (n= cJSON_GetArraySize(vins)) > 0 )
{ {
for (i=0; i<n; i++) for (i=0; i<n; i++)
@ -879,10 +879,10 @@ void iguana_unspents_mark(struct supernet_info *myinfo,struct iguana_info *coin,
{ {
if ( firstslot >= 0 ) if ( firstslot >= 0 )
{ {
char str[65]; printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,txid),vout); printf("slot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,txid),vout);
coin->markedunspents[firstslot] = txid; coin->markedunspents[firstslot] = txid;
} }
} } else printf("error firstslot.[%d] <- %s/v%d\n",firstslot,bits256_str(str,txid),vout);
} }
} }
} }

Loading…
Cancel
Save