This commit is contained in:
jl777
2016-10-21 11:47:19 -03:00
parent 5203fc4b29
commit f856c80979
2 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ uint64_t komodo_accrued_interest(int32_t height,int64_t paidinterest)
int32_t ind,incr = 100000;
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);
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)
{
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++];
memset(np,0,sizeof(*np));
np->nHeight = nHeight;

View File

@@ -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));
else
{
int32_t notarized_height; uint256 notarized_hash;
notarized_height = komodo_notarizeddata(chainActive.Tip()->nHeight,&notarized_hash);
int32_t notarized_height; uint256 notarized_hash,notarized_btctxid;
notarized_height = komodo_notarizeddata(chainActive.Tip()->nHeight,&notarized_hash,&notarized_btctxid);
if ( nHeight < notarized_height )
{
fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height);