Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Oct 10, 2024
1 parent 2cf164f commit 23d26e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spv/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (s *Syncer) Run(ctx context.Context) (err error) {
s.done = make(chan struct{})
s.err = nil
s.doneMu.Unlock()
go func() {
defer func() {
s.doneMu.Lock()
close(s.done)
s.err = err
Expand Down
10 changes: 7 additions & 3 deletions wallet/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,14 @@ func (o OfflineNetworkBackend) Synced(ctx context.Context) (bool, int32) {
return true, 0
}

var closedDone = make(chan struct{})

func init() {
close(closedDone)
}

func (o OfflineNetworkBackend) Done() <-chan struct{} {
c := make(chan struct{})
close(c)
return c
return closedDone
}

func (o OfflineNetworkBackend) Err() error {
Expand Down

0 comments on commit 23d26e4

Please sign in to comment.