Fix tx_notarizedconfirmed

This commit is contained in:
Mihailo Milenkovic
2018-11-26 22:19:15 +01:00
parent 19930a5f65
commit 09ba3bfc9d

View File

@@ -492,15 +492,7 @@ bool komodo_txnotarizedconfirmed(uint256 txid)
return(0); return(0);
} }
confirms=1 + pindex->GetHeight() - txheight; confirms=1 + pindex->GetHeight() - txheight;
if ( txheight > 0 && confirms > 0 && (sp= komodo_stateptr(symbol,dest)) != 0 ) if ((sp= komodo_stateptr(symbol,dest)) != 0 && (notarized=sp->NOTARIZED_HEIGHT) > 0 && txheight > sp->NOTARIZED_HEIGHT) notarized=0;
{
if ( (notarized= sp->NOTARIZED_HEIGHT) > 0 )
{
if ( txheight >= sp->NOTARIZED_HEIGHT )
confirms = (txheight - sp->NOTARIZED_HEIGHT);
else notarized = 0;
}
}
#ifdef TESTMODE #ifdef TESTMODE
notarized=0; notarized=0;
#endif //TESTMODE #endif //TESTMODE