BOOST_CHECK_MESSAGE(checker[i].GetStateSinceHeightFor(vpblock.empty()?nullptr:vpblock.back())==height,strprintf("Test %i for StateSinceHeight",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateSinceHeightFor(vpblock.empty()?nullptr:vpblock.back())==height,strprintf("Test %i for StateSinceHeight",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateSinceHeightFor(vpblock.empty()?nullptr:vpblock.back())==0,strprintf("Test %i for StateSinceHeight (always active)",num));
}
}
}
}
num++;
num++;
@ -92,6 +102,7 @@ public:
for(inti=0;i<CHECKERS;i++){
for(inti=0;i<CHECKERS;i++){
if(InsecureRandBits(i)==0){
if(InsecureRandBits(i)==0){
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_DEFINED,strprintf("Test %i for DEFINED",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_DEFINED,strprintf("Test %i for DEFINED",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE (always active)",num));
}
}
}
}
num++;
num++;
@ -102,6 +113,7 @@ public:
for(inti=0;i<CHECKERS;i++){
for(inti=0;i<CHECKERS;i++){
if(InsecureRandBits(i)==0){
if(InsecureRandBits(i)==0){
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_STARTED,strprintf("Test %i for STARTED",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_STARTED,strprintf("Test %i for STARTED",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE (always active)",num));
}
}
}
}
num++;
num++;
@ -112,6 +124,7 @@ public:
for(inti=0;i<CHECKERS;i++){
for(inti=0;i<CHECKERS;i++){
if(InsecureRandBits(i)==0){
if(InsecureRandBits(i)==0){
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_LOCKED_IN,strprintf("Test %i for LOCKED_IN",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_LOCKED_IN,strprintf("Test %i for LOCKED_IN",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE (always active)",num));
}
}
}
}
num++;
num++;
@ -122,6 +135,7 @@ public:
for(inti=0;i<CHECKERS;i++){
for(inti=0;i<CHECKERS;i++){
if(InsecureRandBits(i)==0){
if(InsecureRandBits(i)==0){
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE (always active)",num));
}
}
}
}
num++;
num++;
@ -132,6 +146,7 @@ public:
for(inti=0;i<CHECKERS;i++){
for(inti=0;i<CHECKERS;i++){
if(InsecureRandBits(i)==0){
if(InsecureRandBits(i)==0){
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_FAILED,strprintf("Test %i for FAILED",num));
BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_FAILED,strprintf("Test %i for FAILED",num));
BOOST_CHECK_MESSAGE(checker_always[i].GetStateFor(vpblock.empty()?nullptr:vpblock.back())==THRESHOLD_ACTIVE,strprintf("Test %i for ACTIVE (always active)",num));