much debug such wow

This commit is contained in:
Duke Leto
2022-07-01 12:20:51 -04:00
parent 2353f1a433
commit 4988ce6f2e
3 changed files with 43 additions and 31 deletions

View File

@@ -504,11 +504,13 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie
int32_t hush_validate_chain(uint256 srchash,int32_t notarized_height)
{
fprintf(stderr,"%s\n", __func__);
static int32_t last_rewind; int32_t rewindtarget; CBlockIndex *pindex; struct hush_state *sp; char symbol[HUSH_SMART_CHAIN_MAXLEN],dest[HUSH_SMART_CHAIN_MAXLEN];
if ( (sp= hush_stateptr(symbol,dest)) == 0 )
return(0);
if ( IsInitialBlockDownload() == 0 && ((pindex= hush_getblockindex(srchash)) == 0 || pindex->GetHeight() != notarized_height) )
{
fprintf(stderr,"%s: Not in IBD, height=%d\n", __func__, pindex->GetHeight() );
if ( sp->NOTARIZED_HEIGHT > 0 && sp->NOTARIZED_HEIGHT < notarized_height )
rewindtarget = sp->NOTARIZED_HEIGHT - 1;
else if ( notarized_height > 101 )