6767#include < boost/thread.hpp>
6868#include < openssl/crypto.h>
6969
70- #include < primitives/pak.h> // CPAKList
7170#include < assetsdir.h> // InitGlobalAssetDir
7271#include < pegins.h>
7372
@@ -1863,72 +1862,7 @@ bool AppInitMain(InitInterfaces& interfaces)
18631862 return false ;
18641863 }
18651864
1866- // ********************************************************* Step 13: Load PAK List
1867-
1868- // First, make sure -enforce_pak and -acceptnonstdtxn aren't conflicting
1869- if (Params ().GetEnforcePak () && gArgs .GetBoolArg (" -acceptnonstdtxn" , !Params ().RequireStandard ())) {
1870- return InitError (" -enforce_pak can not be true if the network accepts non-standard transactions for relay." );
1871- }
1872-
1873- // Entire list of PAK entries from conf must be of valid format
1874- std::vector<std::string> pak_list_str = gArgs .GetArgs (" -pak" );
1875- bool valid_paklist = true ;
1876- bool is_reject = false ;
1877- std::vector<std::vector<unsigned char > > offline_keys;
1878- std::vector<std::vector<unsigned char > > online_keys;
1879- for (unsigned int i = 0 ; i < pak_list_str.size (); i++) {
1880- if (pak_list_str[i] == " reject" ) {
1881- is_reject = true ;
1882- continue ;
1883- }
1884-
1885- size_t colon_index = pak_list_str[i].find (" :" );
1886- if (colon_index == std::string::npos) {
1887- valid_paklist = false ;
1888- break ;
1889- }
1890-
1891- std::string offline = pak_list_str[i].substr (0 , colon_index);
1892- std::string online = pak_list_str[i].substr (colon_index + 1 );
1893-
1894- if (!IsHex (offline) || !IsHex (online) || offline.size () != 66 || online.size () != 66 ) {
1895- valid_paklist = false ;
1896- break ;
1897- }
1898-
1899- online_keys.push_back (ParseHex (online));
1900- offline_keys.push_back (ParseHex (offline));
1901- }
1902- // pak=reject must be alone
1903- if (is_reject && offline_keys.size () > 0 )
1904- valid_paklist = false ;
1905- if (!valid_paklist)
1906- return InitError (_ (" ERROR: Invalid PAK entries given in conf file." ));
1907- if (is_reject || offline_keys.size () > 0 ) {
1908- CPAKList paklist;
1909- if (CPAKList::FromBytes (paklist, offline_keys, online_keys, is_reject)) {
1910- g_paklist_config = paklist;
1911- } else {
1912- return InitError (_ (" ERROR: Invalid PAK entries given in conf file." ));
1913- }
1914- } else {
1915- g_paklist_config = boost::none;
1916- }
1917-
1918- // Read and parse committed pak list from disk
1919- CPAKList paklist;
1920- offline_keys.resize (0 );
1921- online_keys.resize (0 );
1922- bool reject;
1923- if (pblocktree->ReadPAKList (offline_keys, online_keys, reject)) {
1924- if (CPAKList::FromBytes (paklist, offline_keys, online_keys, reject)) {
1925- g_paklist_blockchain = paklist;
1926- } else {
1927- return InitError (_ (" ERROR: Read invalid PAK list." ));
1928- }
1929- }
1930-
1931- // ********************************************************* Step 14: Check fedpeg
1865+ // ********************************************************* Step 13: Check fedpeg
19321866 // ELEMENTS:
19331867 if (chainparams.GetConsensus ().has_parent_chain ) {
19341868 // Will assert if not properly formatted
@@ -1942,7 +1876,7 @@ bool AppInitMain(InitInterfaces& interfaces)
19421876 }
19431877 }
19441878
1945- // ********************************************************* Step 15 : finished
1879+ // ********************************************************* Step 14 : finished
19461880
19471881 SetRPCWarmupFinished ();
19481882
0 commit comments