@@ -893,35 +893,39 @@ std::string GetListOf(std::string datatype)
893893
894894std::string GetListOfWithConsensus (std::string datatype)
895895{
896- std::string rows = " " ;
897- std::string row = " " ;
898- int64_t iEndTime= (GetAdjustedTime ()-CONSENSUS_LOOKBACK) - ( (GetAdjustedTime ()-CONSENSUS_LOOKBACK) % BLOCK_GRANULARITY);
899- int64_t nLookback = 30 * 6 * 86400 ;
900- int64_t iStartTime = (iEndTime - nLookback) - ( (iEndTime - nLookback) % BLOCK_GRANULARITY);
901- printf (" getlistofwithconsensus startime %f , endtime %f, lookback %f \r\n " ,(double )iStartTime,(double )iEndTime, (double )nLookback);
902- for (map<string,string>::iterator ii=mvApplicationCache.begin (); ii!=mvApplicationCache.end (); ++ii)
903- {
904- std::string key_name = (*ii).first ;
905- if (key_name.length () > datatype.length ())
906- {
907- if (key_name.substr (0 ,datatype.length ())==datatype)
908- {
909- int64_t iBeaconTimestamp = mvApplicationCacheTimestamp[(*ii).first ];
910- if (iBeaconTimestamp > iStartTime && iBeaconTimestamp < iEndTime)
911- {
912- std::string key_value = mvApplicationCache[(*ii).first ];
913- std::string subkey = key_name.substr (datatype.length ()+1 ,key_name.length ()-datatype.length ()-1 );
914- row = subkey + " <COL>" + key_value;
915- if (Contains (row," INVESTOR" ) && datatype==" beacon" ) row = " " ;
916- if (row != " " )
917- {
918- rows += row + " <ROW>" ;
919- }
920- }
921- }
922- }
923- }
924- return rows;
896+ std::string rows = " " ;
897+ std::string row = " " ;
898+ int64_t iEndTime= (GetAdjustedTime ()-CONSENSUS_LOOKBACK) - ( (GetAdjustedTime ()-CONSENSUS_LOOKBACK) % BLOCK_GRANULARITY);
899+ int64_t nLookback = 30 * 6 * 86400 ;
900+ int64_t iStartTime = (iEndTime - nLookback) - ( (iEndTime - nLookback) % BLOCK_GRANULARITY);
901+ printf (" getlistofwithconsensus startime %f , endtime %f, lookback %f \r\n " ,(double )iStartTime,(double )iEndTime, (double )nLookback);
902+ for (map<string,string>::iterator ii=mvApplicationCache.begin (); ii!=mvApplicationCache.end (); ++ii)
903+ {
904+ std::string key_name = (*ii).first ;
905+ if (key_name.length () > datatype.length ())
906+ {
907+ // Ignore beaconalts here as to not break the neural network
908+ if (key_name.substr (0 , datatype.length () + 3 ) == " beaconalt" )
909+ continue ;
910+
911+ else if (key_name.substr (0 ,datatype.length ())==datatype)
912+ {
913+ int64_t iBeaconTimestamp = mvApplicationCacheTimestamp[(*ii).first ];
914+ if (iBeaconTimestamp > iStartTime && iBeaconTimestamp < iEndTime)
915+ {
916+ std::string key_value = mvApplicationCache[(*ii).first ];
917+ std::string subkey = key_name.substr (datatype.length ()+1 ,key_name.length ()-datatype.length ()-1 );
918+ row = subkey + " <COL>" + key_value;
919+ if (Contains (row," INVESTOR" ) && datatype==" beacon" ) row = " " ;
920+ if (row != " " )
921+ {
922+ rows += row + " <ROW>" ;
923+ }
924+ }
925+ }
926+ }
927+ }
928+ return rows;
925929}
926930
927931std::string AddContract (std::string sType , std::string sName , std::string sContract )
@@ -3577,7 +3581,7 @@ Array GetJSONBeaconReport()
35773581 Array results;
35783582 Object entry;
35793583 entry.push_back (Pair (" CPID" ," GRCAddress" ));
3580- std::string datatype=" beacon" ;
3584+ std::string datatype=" beacon; " ;
35813585 std::string row;
35823586 for (const auto & item : AppCacheFilter (datatype))
35833587 {
0 commit comments