Skip to content
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

add an option to stop the htlc scan for preimage when all blocks are … #627

Merged
merged 2 commits into from
May 9, 2024

Conversation

arner
Copy link
Contributor

@arner arner commented May 8, 2024

…searched until the tip of the blockchain.

Can be used for a better experience if triggered by a user and you want to show them immediately whether the preimage is available on the current ledger, instead of having to wait until timing out.

…searched until the tip of the blockchain

Signed-off-by: Arne Rutjes <arne123@gmail.com>
@arner arner requested a review from adecaro May 8, 2024 16:01
@adecaro
Copy link
Contributor

adecaro commented May 8, 2024

Hi @arner , thanks for submitting this PR. I was wondering if we could test the new options enhancing the test TestHTLCNoCrossClaimTwoNetworks. That test calls a few times the scan function that invokes a view that calls htlc.ScanForPreImage. We could try to have a positive and a negative case with the use of WithStopOnLastTransaction. What do you think?

@arner arner force-pushed the stopscan branch 2 times, most recently from db6094b to 2643060 Compare May 8, 2024 21:00
Signed-off-by: Arne <arne123@gmail.com>
Copy link
Contributor

@adecaro adecaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adecaro adecaro merged commit f71f8b5 into main May 9, 2024
38 checks passed
@adecaro adecaro deleted the stopscan branch May 9, 2024 04:51
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.

None yet

2 participants