@@ -98,12 +98,16 @@ func NewBoltStore(dir, fileName string) (*BoltStore, error) {
9898}
9999
100100// Close closes the underlying bolt DB.
101+ //
102+ // NOTE: This is part of the Store interface.
101103func (s * BoltStore ) Close () error {
102104 return s .db .Close ()
103105}
104106
105107// NewAccount creates a new OffChainBalanceAccount with the given balance and a
106108// randomly chosen ID.
109+ //
110+ // NOTE: This is part of the Store interface.
107111func (s * BoltStore ) NewAccount (ctx context.Context , balance lnwire.MilliSatoshi ,
108112 expirationDate time.Time , label string ) (* OffChainBalanceAccount ,
109113 error ) {
@@ -175,6 +179,8 @@ func (s *BoltStore) NewAccount(ctx context.Context, balance lnwire.MilliSatoshi,
175179
176180// UpdateAccount writes an account to the database, overwriting the existing one
177181// if it exists.
182+ //
183+ // NOTE: This is part of the Store interface.
178184func (s * BoltStore ) UpdateAccount (_ context.Context ,
179185 account * OffChainBalanceAccount ) error {
180186
@@ -228,6 +234,8 @@ func uniqueRandomAccountID(accountBucket kvdb.RBucket) (AccountID, error) {
228234
229235// Account retrieves an account from the bolt DB and un-marshals it. If the
230236// account cannot be found, then ErrAccNotFound is returned.
237+ //
238+ // NOTE: This is part of the Store interface.
231239func (s * BoltStore ) Account (_ context.Context , id AccountID ) (
232240 * OffChainBalanceAccount , error ) {
233241
@@ -264,6 +272,8 @@ func (s *BoltStore) Account(_ context.Context, id AccountID) (
264272}
265273
266274// Accounts retrieves all accounts from the bolt DB and un-marshals them.
275+ //
276+ // NOTE: This is part of the Store interface.
267277func (s * BoltStore ) Accounts (_ context.Context ) ([]* OffChainBalanceAccount ,
268278 error ) {
269279
@@ -309,6 +319,8 @@ func (s *BoltStore) Accounts(_ context.Context) ([]*OffChainBalanceAccount,
309319}
310320
311321// RemoveAccount finds an account by its ID and removes it from the DB.
322+ //
323+ // NOTE: This is part of the Store interface.
312324func (s * BoltStore ) RemoveAccount (_ context.Context , id AccountID ) error {
313325 return s .db .Update (func (tx kvdb.RwTx ) error {
314326 bucket := tx .ReadWriteBucket (accountBucketName )
@@ -327,6 +339,8 @@ func (s *BoltStore) RemoveAccount(_ context.Context, id AccountID) error {
327339
328340// LastIndexes returns the last invoice add and settle index or
329341// ErrNoInvoiceIndexKnown if no indexes are known yet.
342+ //
343+ // NOTE: This is part of the Store interface.
330344func (s * BoltStore ) LastIndexes (_ context.Context ) (uint64 , uint64 , error ) {
331345 var (
332346 addValue , settleValue []byte
@@ -359,6 +373,8 @@ func (s *BoltStore) LastIndexes(_ context.Context) (uint64, uint64, error) {
359373}
360374
361375// StoreLastIndexes stores the last invoice add and settle index.
376+ //
377+ // NOTE: This is part of the Store interface.
362378func (s * BoltStore ) StoreLastIndexes (_ context.Context , addIndex ,
363379 settleIndex uint64 ) error {
364380
0 commit comments