test
This commit is contained in:
@@ -372,6 +372,8 @@ uint256 komodo_getblockhash(int32_t height)
|
|||||||
return(hash);
|
return(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint256 _komodo_getblockhash(int32_t height);
|
||||||
|
|
||||||
uint64_t komodo_seed(int32_t height)
|
uint64_t komodo_seed(int32_t height)
|
||||||
{
|
{
|
||||||
uint256 hash; uint64_t seed = 0; CBlockIndex *pindex;
|
uint256 hash; uint64_t seed = 0; CBlockIndex *pindex;
|
||||||
@@ -379,10 +381,8 @@ uint64_t komodo_seed(int32_t height)
|
|||||||
if ( height > 10 )
|
if ( height > 10 )
|
||||||
height -= 10;
|
height -= 10;
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
{
|
hash = _komodo_getblockhash(height);
|
||||||
if ( (pindex= chainActive[height]) != 0 )
|
else hash = komodo_getblockhash(height);
|
||||||
hash = pindex->GetBlockHash();
|
|
||||||
} else hash = komodo_getblockhash(height);
|
|
||||||
seed = arith_uint256(hash.GetHex()).GetLow64();
|
seed = arith_uint256(hash.GetHex()).GetLow64();
|
||||||
return(seed);
|
return(seed);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
if ( didstats != 0 )
|
if ( didstats != 0 )
|
||||||
pax->didstats = 1;
|
pax->didstats = 1;
|
||||||
}
|
}
|
||||||
}
|
} else printf("pax %s deposit %.8f rejected\n",base,dstr(fiatoshis));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,6 +272,18 @@ Value getblockhash(const Array& params, bool fHelp)
|
|||||||
return pblockindex->GetBlockHash().GetHex();
|
return pblockindex->GetBlockHash().GetHex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint256 _komodo_getblockhash(int32_t height);
|
||||||
|
{
|
||||||
|
uint256 hash;
|
||||||
|
LOCK(cs_main);
|
||||||
|
if ( nHeight >= 0 && nHeight <= chainActive.Height() )
|
||||||
|
{
|
||||||
|
CBlockIndex* pblockindex = chainActive[nHeight];
|
||||||
|
hash = pblockindex->GetBlockHash();
|
||||||
|
} else memset(&hash,0,sizeof(hash));
|
||||||
|
return(hash);
|
||||||
|
}
|
||||||
|
|
||||||
Value getblock(const Array& params, bool fHelp)
|
Value getblock(const Array& params, bool fHelp)
|
||||||
{
|
{
|
||||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user