From 9b9029cf4bbb09a81c4f96587bc46f3c6392bc26 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 17 Jul 2018 19:14:29 -0700 Subject: [PATCH] routing/chainview: ensure btcd impl meets new interface requirements --- routing/chainview/btcd.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/routing/chainview/btcd.go b/routing/chainview/btcd.go index fc232f61..34d106b3 100644 --- a/routing/chainview/btcd.go +++ b/routing/chainview/btcd.go @@ -12,6 +12,7 @@ import ( "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightningnetwork/lnd/channeldb" ) // BtcdFilteredChainView is an implementation of the FilteredChainView @@ -447,11 +448,18 @@ type filterUpdate struct { // rewound to ensure all relevant notifications are dispatched. // // NOTE: This is part of the FilteredChainView interface. -func (b *BtcdFilteredChainView) UpdateFilter(ops []wire.OutPoint, updateHeight uint32) error { +func (b *BtcdFilteredChainView) UpdateFilter(ops []channeldb.EdgePoint, + updateHeight uint32) error { + + newUtxos := make([]wire.OutPoint, len(ops)) + for i, op := range ops { + newUtxos[i] = op.OutPoint + } + select { case b.filterUpdates <- filterUpdate{ - newUtxos: ops, + newUtxos: newUtxos, updateHeight: updateHeight, }: return nil