Skip to content

Commit 7b1ca7d

Browse files
authored
Merge pull request #9986 from lightningnetwork/0-19-2-branch-rc1
release: create v0.19.2-rc1 branch
2 parents 59a86b3 + 1f336a0 commit 7b1ca7d

File tree

95 files changed

+3628
-1522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3628
-1522
lines changed

accessman.go

Lines changed: 189 additions & 85 deletions
Large diffs are not rendered by default.

accessman_test.go

Lines changed: 435 additions & 17 deletions
Large diffs are not rendered by default.

build/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const (
4747
AppMinor uint = 19
4848

4949
// AppPatch defines the application patch for this binary.
50-
AppPatch uint = 1
50+
AppPatch uint = 2
5151

5252
// AppPreRelease MUST only contain characters from semanticAlphabet per
5353
// the semantic versioning spec.
54-
AppPreRelease = "beta"
54+
AppPreRelease = "beta.rc1"
5555
)
5656

5757
func init() {

chainio/dispatcher.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ func (b *BlockbeatDispatcher) Stop() {
135135
}
136136

137137
func (b *BlockbeatDispatcher) log() btclog.Logger {
138+
// There's no guarantee that the `b.beat` is initialized when the
139+
// dispatcher shuts down, especially in the case where the node is
140+
// running as a remote signer, which doesn't have a chainbackend. In
141+
// that case we will use the package logger.
142+
if b.beat == nil {
143+
return clog
144+
}
145+
138146
return b.beat.logger()
139147
}
140148

chainntnfs/bitcoindnotify/bitcoind.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,16 @@ func (b *BitcoindNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
833833
return nil, err
834834
}
835835

836-
if uint32(blockHeight) > ntfn.HistoricalDispatch.StartHeight {
837-
ntfn.HistoricalDispatch.StartHeight = uint32(blockHeight)
836+
spentHeight := uint32(blockHeight)
837+
chainntnfs.Log.Debugf("Outpoint(%v) has spent at height %v",
838+
outpoint, spentHeight)
839+
840+
// Since the tx has already been spent at spentHeight, the
841+
// heightHint specified by the caller is no longer relevant. We
842+
// now update the starting height to be the spent height to make
843+
// sure we won't miss it in the rescan.
844+
if spentHeight != ntfn.HistoricalDispatch.StartHeight {
845+
ntfn.HistoricalDispatch.StartHeight = spentHeight
838846
}
839847
}
840848

chainntnfs/btcdnotify/btcd.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,15 +933,25 @@ func (b *BtcdNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
933933
"block %v: %v", blockHash, err)
934934
}
935935

936-
if uint32(blockHeader.Height) > ntfn.HistoricalDispatch.StartHeight {
936+
spentHeight := uint32(blockHeader.Height)
937+
chainntnfs.Log.Debugf("Outpoint(%v) has spent at height %v",
938+
outpoint, spentHeight)
939+
940+
// Since the tx has already been spent at spentHeight, the
941+
// heightHint specified by the caller is no longer relevant. We
942+
// now update the starting height to be the spent height to make
943+
// sure we won't miss it in the rescan.
944+
if spentHeight != ntfn.HistoricalDispatch.StartHeight {
937945
startHash, err = b.chainConn.GetBlockHash(
938-
int64(blockHeader.Height),
946+
int64(spentHeight),
939947
)
940948
if err != nil {
941949
return nil, fmt.Errorf("unable to get block "+
942950
"hash for height %d: %v",
943951
blockHeader.Height, err)
944952
}
953+
954+
ntfn.HistoricalDispatch.StartHeight = spentHeight
945955
}
946956
}
947957

chainntnfs/interface.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,28 @@ func (t TxConfStatus) String() string {
7070
}
7171
}
7272

73-
// notifierOptions is a set of functional options that allow callers to further
73+
// NotifierOptions is a set of functional options that allow callers to further
7474
// modify the type of chain event notifications they receive.
75-
type notifierOptions struct {
76-
// includeBlock if true, then the dispatched confirmation notification
75+
type NotifierOptions struct {
76+
// IncludeBlock if true, then the dispatched confirmation notification
7777
// will include the block that mined the transaction.
78-
includeBlock bool
78+
IncludeBlock bool
7979
}
8080

81-
// defaultNotifierOptions returns the set of default options for the notifier.
82-
func defaultNotifierOptions() *notifierOptions {
83-
return &notifierOptions{}
81+
// DefaultNotifierOptions returns the set of default options for the notifier.
82+
func DefaultNotifierOptions() *NotifierOptions {
83+
return &NotifierOptions{}
8484
}
8585

8686
// NotifierOption is a functional option that allows a caller to modify the
8787
// events received from the notifier.
88-
type NotifierOption func(*notifierOptions)
88+
type NotifierOption func(*NotifierOptions)
8989

90-
// WithIncludeBlock is an optional argument that allows the calelr to specify
90+
// WithIncludeBlock is an optional argument that allows the caller to specify
9191
// that the block that mined a transaction should be included in the response.
9292
func WithIncludeBlock() NotifierOption {
93-
return func(o *notifierOptions) {
94-
o.includeBlock = true
93+
return func(o *NotifierOptions) {
94+
o.IncludeBlock = true
9595
}
9696
}
9797

chainntnfs/txnotifier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ func NewTxNotifier(startHeight uint32, reorgSafetyLimit uint32,
559559
// and register a confirmation notification.
560560
func (n *TxNotifier) newConfNtfn(txid *chainhash.Hash,
561561
pkScript []byte, numConfs, heightHint uint32,
562-
opts *notifierOptions) (*ConfNtfn, error) {
562+
opts *NotifierOptions) (*ConfNtfn, error) {
563563

564564
// An accompanying output script must always be provided.
565565
if len(pkScript) == 0 {
@@ -593,7 +593,7 @@ func (n *TxNotifier) newConfNtfn(txid *chainhash.Hash,
593593
n.CancelConf(confRequest, confID)
594594
}),
595595
HeightHint: heightHint,
596-
includeBlock: opts.includeBlock,
596+
includeBlock: opts.IncludeBlock,
597597
numConfsLeft: numConfs,
598598
}, nil
599599
}
@@ -616,7 +616,7 @@ func (n *TxNotifier) RegisterConf(txid *chainhash.Hash, pkScript []byte,
616616
default:
617617
}
618618

619-
opts := defaultNotifierOptions()
619+
opts := DefaultNotifierOptions()
620620
for _, optFunc := range optFuncs {
621621
optFunc(opts)
622622
}

chainreg/chainregistry.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,8 @@ var (
878878
ChainDNSSeeds = map[chainhash.Hash][][2]string{
879879
BitcoinMainnetGenesis: {
880880
{
881-
"nodes.lightning.directory",
882-
"soa.nodes.lightning.directory",
881+
"nodes.lightning.wiki",
882+
"soa.nodes.lightning.wiki",
883883
},
884884
{
885885
"lseed.bitcoinstats.com",
@@ -888,14 +888,22 @@ var (
888888

889889
BitcoinTestnetGenesis: {
890890
{
891-
"test.nodes.lightning.directory",
892-
"soa.nodes.lightning.directory",
891+
"test.nodes.lightning.wiki",
892+
"soa.nodes.lightning.wiki",
893+
},
894+
},
895+
896+
BitcoinTestnet4Genesis: {
897+
{
898+
"test4.nodes.lightning.wiki",
899+
"soa.nodes.lightning.wiki",
893900
},
894901
},
895902

896903
BitcoinSignetGenesis: {
897904
{
898-
"ln.signet.secp.tech",
905+
"signet.nodes.lightning.wiki",
906+
"soa.nodes.lightning.wiki",
899907
},
900908
},
901909
}

0 commit comments

Comments
 (0)