From f9c13b8c60d3135215d368b1e04d134a83c8f132 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 12 Apr 2019 01:36:33 -1100 Subject: [PATCH] Reconsider --- src/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1537dea1c..42e2414b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5335,14 +5335,15 @@ bool AcceptBlock(int32_t *futureblockp,CBlock& block, CValidationState& state, C *futureblockp = 1; if ( ASSETCHAINS_CBOPRET != 0 ) { - CValidationState tmpstate; CBlockIndex *tmpindex; - if ( (tmpindex=komodo_chainactive(tmpptr->GetHeight()-1)) != 0 ) + CValidationState tmpstate; CBlockIndex *tmpindex; int32_t ht; + ht = (int32_t)pindex->GetHeight(); + if ( (tmpindex=komodo_chainactive(ht-1)) != 0 ) { - fprintf(stderr,"reconsider height.%d\n",(int32_t)tmpptr->GetHeight()-1); + fprintf(stderr,"reconsider height.%d\n",(int32_t)ht-1); ReconsiderBlock(tmpstate,tmpindex); - if ( (tmpindex=komodo_chainactive(tmpptr->GetHeight())) != 0 ) + if ( (tmpindex=komodo_chainactive(ht)) != 0 ) { - fprintf(stderr,"reconsider height.%d\n",(int32_t)tmpptr->GetHeight()); + fprintf(stderr,"reconsider height.%d\n",(int32_t)ht); ReconsiderBlock(tmpstate,tmpindex); } }