From a767d4f03f6c72f4a6e853afa136abf3a14000bb Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Apr 2019 03:35:52 -1100 Subject: [PATCH 1/2] pindexFork != 0 && --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 593a41e3f..0ebc5c892 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4241,7 +4241,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo // stay on the same chain tip! int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid; notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); - if ( pindexFork->GetHeight() < notarizedht ) + if ( pindexFork != 0 && pindexFork->GetHeight() < notarizedht ) { fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht); return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht), From 9d0cc33d147f2fc542ab3949d84a4ac965672a69 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Apr 2019 03:36:20 -1100 Subject: [PATCH 2/2] pindexFork != 0 && --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 593a41e3f..0ebc5c892 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4241,7 +4241,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo // stay on the same chain tip! int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid; notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); - if ( pindexFork->GetHeight() < notarizedht ) + if ( pindexFork != 0 && pindexFork->GetHeight() < notarizedht ) { fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht); return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht),