test
This commit is contained in:
@@ -87,7 +87,7 @@ uint64_t komodo_accrued_interest(int32_t height,int64_t paidinterest)
|
|||||||
int32_t ind,incr = 100000;
|
int32_t ind,incr = 100000;
|
||||||
if ( height >= maxheight )
|
if ( height >= maxheight )
|
||||||
{
|
{
|
||||||
interests = realloc(interests,(maxheight + incr) * sizeof(*interests) * 2);
|
interests = (uint64_t *)realloc(interests,(maxheight + incr) * sizeof(*interests) * 2);
|
||||||
memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2);
|
memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2);
|
||||||
maxheight += incr;
|
maxheight += incr;
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33)
|
|||||||
void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 notarized_hash,uint256 notarized_btctxid)
|
void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 notarized_hash,uint256 notarized_btctxid)
|
||||||
{
|
{
|
||||||
struct notarized_checkpoint *np;
|
struct notarized_checkpoint *np;
|
||||||
NPOINTS = realloc(NPOINTS,(NUM_NPOINTS+1) * sizeof(*NPOINTS));
|
NPOINTS = (struct notarized_checkpoint *)realloc(NPOINTS,(NUM_NPOINTS+1) * sizeof(*NPOINTS));
|
||||||
np = &NPOINTS[NUM_NPOINTS++];
|
np = &NPOINTS[NUM_NPOINTS++];
|
||||||
memset(np,0,sizeof(*np));
|
memset(np,0,sizeof(*np));
|
||||||
np->nHeight = nHeight;
|
np->nHeight = nHeight;
|
||||||
|
|||||||
@@ -3076,8 +3076,8 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
|
|||||||
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int32_t notarized_height; uint256 notarized_hash;
|
int32_t notarized_height; uint256 notarized_hash,notarized_btctxid;
|
||||||
notarized_height = komodo_notarizeddata(chainActive.Tip()->nHeight,¬arized_hash);
|
notarized_height = komodo_notarizeddata(chainActive.Tip()->nHeight,¬arized_hash,¬arized_btctxid);
|
||||||
if ( nHeight < notarized_height )
|
if ( nHeight < notarized_height )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height);
|
fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height);
|
||||||
|
|||||||
Reference in New Issue
Block a user