Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jl777 committed Jun 25, 2016
1 parent 09f0186 commit 4176e76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions datachain/datachain.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ int32_t iguana_opreturn(struct supernet_info *myinfo,int32_t ordered,struct igua

void datachain_update_spend(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,uint32_t timestamp,struct iguana_bundle *bp,int32_t height,bits256 txid,int32_t vout,uint8_t rmd160[20],int64_t value)
{
return;
if ( strcmp("BTC",coin->symbol) == 0 )
datachain_update_txidvout(myinfo,ordered,coin,&myinfo->dPoW.BTC,DATACHAIN_ISBTC,height,txid,vout,rmd160,value);
else if ( strcmp("BTCD",coin->symbol) == 0 )
Expand All @@ -313,6 +314,7 @@ void datachain_update_spend(struct supernet_info *myinfo,int32_t ordered,struct

int64_t datachain_update(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,uint32_t timestamp,struct iguana_bundle *bp,uint8_t rmd160[20],int64_t crypto777_payment,uint8_t type,int32_t height,uint64_t hdrsi_unspentind,int64_t value,uint32_t fileid,uint64_t scriptpos,int32_t scriptlen,bits256 txid,int32_t vout)
{
return(0);
if ( memcmp(rmd160,CRYPTO777_RMD160,20) == 0 )
crypto777_payment += value;
else if ( crypto777_payment != 0 && (type == IGUANA_SCRIPT_OPRETURN || type == IGUANA_SCRIPT_3of3 || type == IGUANA_SCRIPT_2of2 || type == IGUANA_SCRIPT_1of1) )
Expand Down
6 changes: 3 additions & 3 deletions iguana/SuperNET_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ int32_t SuperNET_savejsonfile(char *finalfname,bits256 privkey,bits256 destpubke
free(confstr);
if ( retval == 0 && strcmp(destfname,finalfname) != 0 )
{
char oldfname[1024];
if ( OS_filesize(finalfname) >= OS_filesize(destfname) )
printf("skip replacing (%s) since new one is smaller\n",finalfname);
char oldfname[1024]; int64_t fsize,dsize;
if ( (fsize= OS_filesize(finalfname)) >= (dsize= OS_filesize(destfname)) )
printf("skip replacing (%s) since new one is smaller %lld vs %lld\n",finalfname,(long long)fsize,(long long)dsize);
else
{
strcpy(oldfname,finalfname), strcat(oldfname,".old");
Expand Down

0 comments on commit 4176e76

Please sign in to comment.