Browse Source

Test

etomic
jl777 8 years ago
parent
commit
3f60bfa7ba
  1. 4
      iguana/iguana_payments.c

4
iguana/iguana_payments.c

@ -366,7 +366,7 @@ uint64_t _iguana_interest(uint32_t now,int32_t chainheight,uint32_t txlocktime,u
uint64_t iguana_interest(struct supernet_info *myinfo,struct iguana_info *coin,bits256 txid,int32_t vout,uint64_t value) uint64_t iguana_interest(struct supernet_info *myinfo,struct iguana_info *coin,bits256 txid,int32_t vout,uint64_t value)
{ {
char *retstr; int32_t height; cJSON *retjson; struct iguana_txid T,*tx; uint64_t interest=0; char *retstr; int32_t height; cJSON *retjson=0; struct iguana_txid T,*tx; uint64_t interest=0;
if ( coin->FULLNODE < 0 ) // komodod is running if ( coin->FULLNODE < 0 ) // komodod is running
{ {
if ( (retjson= dpow_gettxout(myinfo,coin,txid,vout)) != 0 ) if ( (retjson= dpow_gettxout(myinfo,coin,txid,vout)) != 0 )
@ -394,7 +394,7 @@ uint64_t iguana_interest(struct supernet_info *myinfo,struct iguana_info *coin,b
interest = _iguana_interest((uint32_t)time(NULL),coin->longestchain,tx->locktime,value); interest = _iguana_interest((uint32_t)time(NULL),coin->longestchain,tx->locktime,value);
} }
} }
char str[65]; printf("interest for %s.v%d %.8f %.8f\n",bits256_str(str,txid),vout,dstr(value),dstr(interest)); char str[65]; printf("interest for %s.v%d %.8f %.8f (%s)\n",bits256_str(str,txid),vout,dstr(value),dstr(interest),retjson!=0?jprint(retjson,0):"");
return(interest); return(interest);
} }

Loading…
Cancel
Save