test
This commit is contained in:
@@ -36,7 +36,7 @@ struct komodo_state KOMODO_STATES[34];
|
||||
|
||||
int COINBASE_MATURITY = 100;
|
||||
|
||||
int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE;
|
||||
int32_t IS_KOMODO_NOTARY,KOMODO_REWIND,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE;
|
||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES;
|
||||
uint8_t NOTARY_PUBKEY33[33];
|
||||
|
||||
|
||||
@@ -1450,6 +1450,8 @@ void komodo_args()
|
||||
if ( strlen(NOTARY_PUBKEY.c_str()) == 66 )
|
||||
USE_EXTERNAL_PUBKEY = 1;
|
||||
name = GetArg("-ac_name","");
|
||||
if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 )
|
||||
printf("KOMODO REWIND.%d\n",KOMODO_REWIND);
|
||||
if ( name.c_str()[0] != 0 )
|
||||
{
|
||||
ASSETCHAINS_SUPPLY = GetArg("-ac_supply",10);
|
||||
|
||||
23
src/main.cpp
23
src/main.cpp
@@ -2694,6 +2694,7 @@ static void PruneBlockIndexCandidates() {
|
||||
* pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
|
||||
*/
|
||||
static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork, CBlock *pblock) {
|
||||
extern int32_t KOMODO_REWIND;
|
||||
AssertLockHeld(cs_main);
|
||||
bool fInvalidFound = false;
|
||||
const CBlockIndex *pindexOldTip = chainActive.Tip();
|
||||
@@ -2704,21 +2705,21 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
|
||||
if (!DisconnectTip(state))
|
||||
return false;
|
||||
}
|
||||
if ( 1 )
|
||||
{
|
||||
static int32_t didinit;
|
||||
if ( didinit++ == 0 )
|
||||
if ( KOMODO_REWIND != 0 && chainActive.Tip()->nHeight > KOMODO_REWIND )
|
||||
{
|
||||
while (chainActive.Tip()->nHeight > 94000 )
|
||||
static int32_t didinit;
|
||||
if ( didinit++ == 0 )
|
||||
{
|
||||
fprintf(stderr,"rewind ht.%d\n",chainActive.Tip()->nHeight);
|
||||
if ( !DisconnectTip(state) )
|
||||
return false;
|
||||
while (chainActive.Tip()->nHeight > KOMODO_REWIND )
|
||||
{
|
||||
fprintf(stderr,"rewind ht.%d\n",chainActive.Tip()->nHeight);
|
||||
if ( !DisconnectTip(state) )
|
||||
return false;
|
||||
}
|
||||
pindexOldTip = chainActive.Tip();
|
||||
pindexFork = chainActive.FindFork(pindexMostWork);
|
||||
}
|
||||
pindexOldTip = chainActive.Tip();
|
||||
pindexFork = chainActive.FindFork(pindexMostWork);
|
||||
}
|
||||
}
|
||||
// Build list of new blocks to connect.
|
||||
std::vector<CBlockIndex*> vpindexToConnect;
|
||||
bool fContinue = true;
|
||||
|
||||
Reference in New Issue
Block a user