@@ -28,6 +28,8 @@ func getSessionKey(session *Session) []byte {
2828// StoreSession stores a session in the store. If a session with the
2929// same local public key already exists, the existing record is updated/
3030// overwritten instead.
31+ //
32+ // NOTE: this is part of the Store interface.
3133func (db * DB ) StoreSession (session * Session ) error {
3234 var buf bytes.Buffer
3335 if err := SerializeSession (& buf , session ); err != nil {
@@ -46,6 +48,8 @@ func (db *DB) StoreSession(session *Session) error {
4648}
4749
4850// GetSession fetches the session with the given key.
51+ //
52+ // NOTE: this is part of the Store interface.
4953func (db * DB ) GetSession (key * btcec.PublicKey ) (* Session , error ) {
5054 var session * Session
5155 err := db .View (func (tx * bbolt.Tx ) error {
@@ -74,6 +78,8 @@ func (db *DB) GetSession(key *btcec.PublicKey) (*Session, error) {
7478}
7579
7680// ListSessions returns all sessions currently known to the store.
81+ //
82+ // NOTE: this is part of the Store interface.
7783func (db * DB ) ListSessions (filterFn func (s * Session ) bool ) ([]* Session , error ) {
7884 var sessions []* Session
7985 err := db .View (func (tx * bbolt.Tx ) error {
@@ -112,6 +118,8 @@ func (db *DB) ListSessions(filterFn func(s *Session) bool) ([]*Session, error) {
112118
113119// RevokeSession updates the state of the session with the given local
114120// public key to be revoked.
121+ //
122+ // NOTE: this is part of the Store interface.
115123func (db * DB ) RevokeSession (key * btcec.PublicKey ) error {
116124 var session * Session
117125 err := db .View (func (tx * bbolt.Tx ) error {
0 commit comments