test
This commit is contained in:
@@ -18,13 +18,13 @@
|
|||||||
uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest)
|
uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest)
|
||||||
{
|
{
|
||||||
static uint64_t *interests; static int32_t maxheight;
|
static uint64_t *interests; static int32_t maxheight;
|
||||||
uint64_t total; int32_t ind,incr = 1000000;
|
uint64_t total; int32_t ind,incr = 100000;
|
||||||
if ( height >= maxheight )
|
if ( height >= maxheight )
|
||||||
{
|
{
|
||||||
if ( interests == 0 )
|
if ( interests == 0 )
|
||||||
{
|
{
|
||||||
interests = (uint64_t *)calloc(incr,sizeof(*interests) * 2); // fix before block 1 million
|
maxheight = height + incr;
|
||||||
maxheight += incr;
|
interests = (uint64_t *)calloc(maxheight,sizeof(*interests) * 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user