-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update predicate scanning status on every trigger #603
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -177,6 +183,7 @@ pub async fn scan_bitcoin_chainstate_via_rpc_using_predicate( | |||
Ok(actions) => { | |||
if actions > 0 { | |||
number_of_times_triggered += 1; | |||
loop_did_trigger = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to my previous comment: aren't these variables interchangeable?
Hey @MicaiahReid ! Not sure if I understand the need of a new control variable. Can't |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM!
a58f9ee
to
1c73b76
Compare
The predicate status is used to report data to users and to pick back up where the service left off on a restart. This change updates the scanning predicate status to be updated on every successful trigger of a scanning predicate, to be sure we don't scan blocks twice on a restart (if the status was set to a previous block, we'd start on that block at startup)