File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -2899,17 +2899,22 @@ void CMPTxList::LoadActivations(int blockHeight)
28992899
29002900 PrintToLog (" Loading feature activations from levelDB\n " );
29012901
2902- for (it->SeekToFirst (); it->Valid (); it->Next ()) {
2903- skey = it->key ();
2904- svalue = it->value ();
2905- std::string itData = svalue.ToString ();
2902+ std::vector<std::pair<int64_t , uint256> > loadOrder;
29062903
2904+ for (it->SeekToFirst (); it->Valid (); it->Next ()) {
2905+ std::string itData = it->value ().ToString ();
29072906 std::vector<std::string> vstr;
29082907 boost::split (vstr, itData, boost::is_any_of (" :" ), token_compress_on);
2909- if (4 != vstr.size ()) continue ;
2908+ if (4 != vstr.size ()) continue ; // unexpected number of tokens
29102909 if (atoi (vstr[2 ]) != OMNICORE_MESSAGE_TYPE_ACTIVATION || atoi (vstr[0 ]) != 1 ) continue ; // we only care about valid activations
2910+ uint256 txid (it->key ().ToString ());;
2911+ loadOrder.push_back (std::make_pair (atoi (vstr[1 ]), txid));
2912+ }
29112913
2912- uint256 hash (skey.ToString ());
2914+ std::sort (loadOrder.begin (), loadOrder.end ());
2915+
2916+ for (std::vector<std::pair<int64_t , uint256> >::iterator it = loadOrder.begin (); it != loadOrder.end (); ++it) {
2917+ uint256 hash = (*it).second ;
29132918 uint256 blockHash = 0 ;
29142919 CTransaction wtx;
29152920 CMPTransaction mp_obj;
You can’t perform that action at this time.
0 commit comments