Test
This commit is contained in:
@@ -1419,8 +1419,8 @@ UniValue getchaintips(const UniValue& params, bool fHelp)
|
|||||||
of another block. */
|
of another block. */
|
||||||
static pthread_mutex_t mutex; static int32_t didinit;
|
static pthread_mutex_t mutex; static int32_t didinit;
|
||||||
if ( didinit == 0 )
|
if ( didinit == 0 )
|
||||||
portable_mutex_init(&mutex);
|
pthread_mutex_init(&mutex);
|
||||||
portable_mutex_lock(&mutex);
|
pthread_mutex_lock(&mutex);
|
||||||
std::set<const CBlockIndex*, CompareBlocksByHeight> setTips;
|
std::set<const CBlockIndex*, CompareBlocksByHeight> setTips;
|
||||||
int32_t n = 0;
|
int32_t n = 0;
|
||||||
BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex)
|
BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex)
|
||||||
@@ -1440,7 +1440,7 @@ UniValue getchaintips(const UniValue& params, bool fHelp)
|
|||||||
setTips.erase(pprev);
|
setTips.erase(pprev);
|
||||||
}
|
}
|
||||||
fprintf(stderr,"iterations getchaintips %d\n",n);
|
fprintf(stderr,"iterations getchaintips %d\n",n);
|
||||||
portable_mutex_unlock(&mutex);
|
pthread_mutex_unlock(&mutex);
|
||||||
|
|
||||||
// Always report the currently active tip.
|
// Always report the currently active tip.
|
||||||
setTips.insert(chainActive.LastTip());
|
setTips.insert(chainActive.LastTip());
|
||||||
|
|||||||
Reference in New Issue
Block a user