Remove unnecessary staking delay
This commit is contained in:
@@ -760,7 +760,7 @@ uint32_t komodo_chainactive_timestamp()
|
|||||||
|
|
||||||
CBlockIndex *komodo_chainactive(int32_t height)
|
CBlockIndex *komodo_chainactive(int32_t height)
|
||||||
{
|
{
|
||||||
if ( chainActive.Tip() != 0 )
|
if ( chainActive.LastTip() != 0 )
|
||||||
{
|
{
|
||||||
if ( height <= chainActive.LastTip()->nHeight )
|
if ( height <= chainActive.LastTip()->nHeight )
|
||||||
return(chainActive[height]);
|
return(chainActive[height]);
|
||||||
|
|||||||
@@ -854,22 +854,6 @@ void static VerusStaker(CWallet *pwallet)
|
|||||||
|
|
||||||
// try a nice clean peer connection to start
|
// try a nice clean peer connection to start
|
||||||
waitForPeers(chainparams);
|
waitForPeers(chainparams);
|
||||||
// try a nice clean peer connection to start
|
|
||||||
waitForPeers(chainparams);
|
|
||||||
CBlockIndex* pindexPrev, *pindexCur;
|
|
||||||
do {
|
|
||||||
{
|
|
||||||
LOCK(cs_main);
|
|
||||||
pindexPrev = chainActive.Tip();
|
|
||||||
}
|
|
||||||
MilliSleep(5000 + rand() % 5000);
|
|
||||||
{
|
|
||||||
LOCK(cs_main);
|
|
||||||
pindexCur = chainActive.Tip();
|
|
||||||
}
|
|
||||||
} while (pindexPrev != pindexCur);
|
|
||||||
|
|
||||||
sleep(5);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
|||||||
Reference in New Issue
Block a user