Skip to content

Make an usleep after blocknotify recieved to prevent loosing blocks#240

Closed
opensourcerulez wants to merge 2 commits into
tpruvot:nextfrom
opensourcerulez:patch-1
Closed

Make an usleep after blocknotify recieved to prevent loosing blocks#240
opensourcerulez wants to merge 2 commits into
tpruvot:nextfrom
opensourcerulez:patch-1

Conversation

@opensourcerulez
Copy link
Copy Markdown

@opensourcerulez opensourcerulez commented Mar 12, 2018

Prevent cases when wallet answers "ACCEPT" blockhash few ms after "BLOCKNOTIFY" and block is not stored in db...

You can play with number of MS in usleep to get minimal delay in you system...

Real example from logs:
16:58:37: notify: new block ZZZZZZZZ
16:58:37: *** ACCEPTED (diff 12345) by XXXX
(names were changed :D )

@opensourcerulez opensourcerulez changed the title Update client.cpp change sleep into usleep Mar 12, 2018
@opensourcerulez opensourcerulez changed the title change sleep into usleep Make an usleep after blocknotify recieved to prevent loosing blocks Mar 12, 2018
@tpruvot
Copy link
Copy Markdown
Owner

tpruvot commented Mar 12, 2018

hmm, doesnt seems useful... could be even worst.

But maybe an optional delay could be set in the .conf

@opensourcerulez
Copy link
Copy Markdown
Author

I saw it on many coins... i will make another commit later without delay - but now it can help not to loose blocks on fast coins where blocks cron searches too slow

tpruvot added a commit that referenced this pull request Mar 12, 2018
prevent job delays if no blocks were submitted

double check coin id on blocknotify
@tpruvot
Copy link
Copy Markdown
Owner

tpruvot commented Mar 12, 2018

see related PR #241, this one was reverted...

@tpruvot tpruvot closed this Mar 12, 2018
Revasz pushed a commit to Revasz/yiimp that referenced this pull request Mar 12, 2018
prevent job delays if no blocks were submitted

double check coin id on blocknotify
@opensourcerulez opensourcerulez deleted the patch-1 branch March 13, 2018 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants