More testing for header transfers
This commit is contained in:
@@ -830,14 +830,24 @@ void static VerusStaker(CWallet *pwallet)
|
|||||||
waitForPeers(chainparams);
|
waitForPeers(chainparams);
|
||||||
// try a nice clean peer connection to start
|
// try a nice clean peer connection to start
|
||||||
waitForPeers(chainparams);
|
waitForPeers(chainparams);
|
||||||
CBlockIndex* pindexPrev;
|
CBlockIndex* pindexPrev, *pindexCur;
|
||||||
do {
|
do {
|
||||||
|
{
|
||||||
|
LOCK(cs_main);
|
||||||
pindexPrev = chainActive.Tip();
|
pindexPrev = chainActive.Tip();
|
||||||
|
}
|
||||||
MilliSleep(5000 + rand() % 5000);
|
MilliSleep(5000 + rand() % 5000);
|
||||||
} while (pindexPrev != chainActive.Tip());
|
{
|
||||||
|
LOCK(cs_main);
|
||||||
|
pindexCur = chainActive.Tip();
|
||||||
|
}
|
||||||
|
} while (pindexPrev != pindexCur);
|
||||||
|
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
|
{
|
||||||
printf("Staking height %d for %s\n", chainActive.Tip()->nHeight + 1, ASSETCHAINS_SYMBOL);
|
printf("Staking height %d for %s\n", chainActive.Tip()->nHeight + 1, ASSETCHAINS_SYMBOL);
|
||||||
|
}
|
||||||
//fprintf(stderr,"Staking height %d for %s\n", chainActive.Tip()->nHeight + 1, ASSETCHAINS_SYMBOL);
|
//fprintf(stderr,"Staking height %d for %s\n", chainActive.Tip()->nHeight + 1, ASSETCHAINS_SYMBOL);
|
||||||
|
|
||||||
miningTimer.start();
|
miningTimer.start();
|
||||||
@@ -1005,11 +1015,18 @@ void static BitcoinMiner_noeq()
|
|||||||
|
|
||||||
// try a nice clean peer connection to start
|
// try a nice clean peer connection to start
|
||||||
waitForPeers(chainparams);
|
waitForPeers(chainparams);
|
||||||
CBlockIndex* pindexPrev;
|
CBlockIndex *pindexPrev, *pindexCur;
|
||||||
do {
|
do {
|
||||||
|
{
|
||||||
|
LOCK(cs_main);
|
||||||
pindexPrev = chainActive.Tip();
|
pindexPrev = chainActive.Tip();
|
||||||
|
}
|
||||||
MilliSleep(5000 + rand() % 5000);
|
MilliSleep(5000 + rand() % 5000);
|
||||||
} while (pindexPrev != chainActive.Tip());
|
{
|
||||||
|
LOCK(cs_main);
|
||||||
|
pindexCur = chainActive.Tip();
|
||||||
|
}
|
||||||
|
} while (pindexPrev != pindexCur);
|
||||||
|
|
||||||
printf("Mining height %d\n", chainActive.Tip()->nHeight + 1);
|
printf("Mining height %d\n", chainActive.Tip()->nHeight + 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user