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

loopdb: fix faulty timestamps on startup #617

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

sputn1ck
Copy link
Member

@sputn1ck sputn1ck commented Aug 7, 2023

This PR addresses lightninglabs/lightning-terminal#615 .

For now I only fix the faulty timestamps on startup. We need to discuss whether loop should check if the timestamp is in milliseconds (and use seconds instead) or if we want to change how lightning-terminal constructs the loop out swap.

@sputn1ck sputn1ck force-pushed the fix_faulty_timestamps branch 3 times, most recently from 5b161ae to 3664ec9 Compare August 7, 2023 11:31
@sputn1ck sputn1ck marked this pull request as ready for review August 7, 2023 14:47
Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! 🥇

loopdb/sqlite.go Show resolved Hide resolved
loopdb/sqlite.go Outdated Show resolved Hide resolved
loopdb/sqlite.go Outdated Show resolved Hide resolved
loopdb/sqlite.go Outdated Show resolved Hide resolved
loopdb/sqlite.go Show resolved Hide resolved
loopdb/sql_test.go Outdated Show resolved Hide resolved
This commit fixes faulty timestamps caused by using unix milliseconds
as unix seconds on startup.
This commit also adds a test for the lightning-terminal issue that first
reported the bug.
Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM, great work on this fix! 💯

loopdb/sql_test.go Outdated Show resolved Hide resolved
@sputn1ck sputn1ck removed the request for review from hieblmi August 8, 2023 07:02
@sputn1ck sputn1ck merged commit 824f543 into lightninglabs:master Aug 8, 2023
5 checks passed
@sputn1ck sputn1ck deleted the fix_faulty_timestamps branch August 8, 2023 07:03
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

4 participants