mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-26 14:08:41 +01:00
routing: include the channel point of chan within edge update ntfn
This commit modifies the `ChannelEdgeUpdate` struct to include the channel point itself within the notifications. Such a change improves the notificaiton experience for callers as it allows them to filter out update notifications based on a familiar object within the codebase: a channel point.
This commit is contained in:
@@ -340,7 +340,7 @@ func TestEdgeUpdateNotification(t *testing.T) {
|
||||
|
||||
// First we'll create the utxo for the channel to be "closed"
|
||||
const chanValue = btcutil.Amount(10000)
|
||||
fundingTx, _, chanID := randChannelEdge(ctx, chanValue,
|
||||
fundingTx, chanPoint, chanID := randChannelEdge(ctx, chanValue,
|
||||
startingBlockHeight)
|
||||
|
||||
// We'll also add a record for the block that included our funding
|
||||
@@ -404,6 +404,10 @@ func TestEdgeUpdateNotification(t *testing.T) {
|
||||
t.Fatalf("channel ID of edge doesn't match: "+
|
||||
"expected %v, got %v", chanID.ToUint64(), edgeUpdate.ChanID)
|
||||
}
|
||||
if edgeUpdate.ChanPoint != chanPoint {
|
||||
t.Fatalf("channel don't match: expected %v, got %v",
|
||||
chanPoint, edgeUpdate.ChanPoint)
|
||||
}
|
||||
// TODO(roasbeef): this is a hack, needs to be removed
|
||||
// after commitment fees are dynamic.
|
||||
if edgeUpdate.Capacity != chanValue-5000 {
|
||||
|
||||
Reference in New Issue
Block a user