Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
3aeb4a9edc
  1. 4
      basilisk/basilisk.c
  2. 2
      iguana/iguana_unspents.c
  3. 1
      iguana/iguana_wallet.c
  4. 2
      includes/iguana_structs.h

4
basilisk/basilisk.c

@ -816,9 +816,11 @@ void basilisks_loop(void *arg)
//for (i=0; i<BASILISK_MAXRELAYS; i++)
// if ( coin->relay_RTheights[i] != 0 )
// break;
if ( (time(NULL) % 10) == 0 ) //i == BASILISK_MAXRELAYS ||
if ( time(NULL) > coin->lastunspentsupdate+10 ) //i == BASILISK_MAXRELAYS ||
{
printf(">>>>>>>>>>>>> update\n");
basilisk_unspents_update(myinfo,coin);
coin->lastunspentsupdate = (uint32_t)time(NULL);
}
}
}

2
iguana/iguana_unspents.c

@ -1270,6 +1270,7 @@ int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coi
iguana_RTnewblock(myinfo,coin,block);
portable_mutex_unlock(&coin->RTmutex);
}
basilisk_unspents_update(myinfo,coin);
return(coin->histbalance);
}
}
@ -1408,6 +1409,7 @@ continue;
iguana_RTnewblock(myinfo,coin,block);
portable_mutex_unlock(&coin->RTmutex);
}
basilisk_unspents_update(myinfo,coin);
return(coin->histbalance);
}
}

1
iguana/iguana_wallet.c

@ -1156,6 +1156,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout)
retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,password,permanentfile,0);
myinfo->expiration = (uint32_t)time(NULL) + timeout;
iguana_walletinitcheck(myinfo,coin);
basilisk_unspents_update(myinfo,coin);
return(retstr);
}

2
includes/iguana_structs.h

@ -470,7 +470,7 @@ struct iguana_info
struct iguana_utxoaddr *utxoaddrs,*RTprev; uint32_t utxodatasize,utxoaddrind;
int64_t histbalance,RTcredits,RTdebits;
void *utxoaddrfileptr; long utxoaddrfilesize;
uint32_t utxoaddrlastcount,*utxoaddroffsets; uint8_t *utxoaddrtable; bits256 utxoaddrhash;
uint32_t utxoaddrlastcount,*utxoaddroffsets,lastunspentsupdate; uint8_t *utxoaddrtable; bits256 utxoaddrhash;
struct iguana_block *RTblocks[65536]; uint8_t *RTrawdata[65536]; int32_t RTrecvlens[65536],RTnumtx[65536];
struct iguana_RTtxid *RTdataset; struct iguana_RTaddr *RTaddrs;
};

Loading…
Cancel
Save