Browse Source

Merge pull request #174 from bhandras/mock_update

test: update chainnotifier mock to fwd notifications for matching txs
pull/182/head
Olaoluwa Osuntokun 9 months ago
committed by GitHub
parent
commit
8301abdb4c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      test/chainnotifier_mock.go

+ 6
- 3
test/chainnotifier_mock.go View File

@ -1,6 +1,7 @@
package test
import (
"bytes"
"sync"
"time"
@ -111,9 +112,11 @@ func (c *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,
select {
case m := <-c.lnd.ConfChannel:
select {
case confChan <- m:
case <-ctx.Done():
if bytes.Equal(m.Tx.TxOut[0].PkScript, pkScript) {
select {
case confChan <- m:
case <-ctx.Done():
}
}
case <-ctx.Done():
}

Loading…
Cancel
Save