Skip to content

Conversation

@ellemouton
Copy link
Member

Ok actual actual last moulding PR before plugging in the SQL backend :)

See commit messages for more details.

Rename it to GetSessionByLocalPub so that it is more accurately named
and so that we free up the GetSession name for future use.
By default, we fetch records by an ID.
It's a better pattern to refer to sessions in the same way consistently.
So we update the UpdateSessionRemotePubKey method to use a session ID as
a reference to the session instead of local pub key.
@ellemouton ellemouton self-assigned this Mar 4, 2025
@ellemouton ellemouton added the no-changelog This PR is does not require a release notes entry label Mar 4, 2025
Copy link
Contributor

@ViktorT-11 ViktorT-11 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀!

session, err := DeserializeSession(
bytes.NewReader(serialisedSession),
)
session, err := getSessionByID(sessionBucket, id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Maybe rename the internal getSessionByID to getSession as well :)?

Copy link
Member Author

@ellemouton ellemouton Mar 6, 2025

Choose a reason for hiding this comment

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

this is verryyyy nitty yall 😅 i think exposed/exported methods are the main focus. especially since we will delete all this code kvdb code by the end of the series

Copy link
Contributor

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

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

Nice 🎉

@ellemouton ellemouton merged commit f082579 into lightninglabs:master Mar 6, 2025
20 of 21 checks passed
@ellemouton ellemouton deleted the sql20Sessions12 branch March 6, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR is does not require a release notes entry sql-ize

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants