mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
firewalldb: thread context to PrivMap NewPair
Update the NewPair method of the PrivacyMapTx interface to take a context.
This commit is contained in:
parent
7ce36d7e7d
commit
197ee3b5ba
5 changed files with 67 additions and 55 deletions
|
|
@ -1226,11 +1226,11 @@ func (s *sessionRpcServer) AddAutopilotSession(ctx context.Context,
|
|||
|
||||
// Register all the privacy map pairs for this session ID.
|
||||
privDB := s.cfg.privMap(sess.GroupID)
|
||||
err = privDB.Update(ctx, func(_ context.Context,
|
||||
err = privDB.Update(ctx, func(ctx context.Context,
|
||||
tx firewalldb.PrivacyMapTx) error {
|
||||
|
||||
for r, p := range newPrivMapPairs {
|
||||
err := tx.NewPair(r, p)
|
||||
err := tx.NewPair(ctx, r, p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue