From e25265297c2f35784b3501eae9b983857b5c0999 Mon Sep 17 00:00:00 2001
From: ziggie <ziggie1984@protonmail.com>
Date: Sun, 10 Dec 2023 14:19:16 +0100
Subject: [PATCH] routing: bump btcwallet version and increase logs.

---
 go.mod            | 6 ++++++
 go.sum            | 8 ++++----
 routing/router.go | 7 +++++++
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/go.mod b/go.mod
index fcdab1c860..11e3283c94 100644
--- a/go.mod
+++ b/go.mod
@@ -213,3 +213,9 @@ replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-d
 go 1.19
 
 retract v0.0.2
+
+// replace github.com/lightninglabs/neutrino v0.16.0 => /Users/ziggie-pro/working_freetime/neutrino
+
+replace github.com/lightninglabs/neutrino v0.16.0 => github.com/ziggie1984/neutrino v0.15.1-0.20231213184926-ca5f91e88713
+
+replace github.com/btcsuite/btcwallet v0.16.10-0.20231129183218-5df09dd43358 => github.com/ziggie1984/btcwallet v0.14.1-0.20231213185304-7f7ebd14e3d9
diff --git a/go.sum b/go.sum
index 5d07264dcc..a2eccc736d 100644
--- a/go.sum
+++ b/go.sum
@@ -95,8 +95,6 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtyd
 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
 github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
-github.com/btcsuite/btcwallet v0.16.10-0.20231129183218-5df09dd43358 h1:lZUSo6TISHUJQxpn/AniW5gqaN1iRNS87SDWvV3AHfg=
-github.com/btcsuite/btcwallet v0.16.10-0.20231129183218-5df09dd43358/go.mod h1:WSKhOJWUmUOHKCKEzdt+jWAHFAE/t4RqVbCwL2pEdiU=
 github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU=
 github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0=
 github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 h1:BtEN5Empw62/RVnZ0VcJaVtVlBijnLlJY+dwjAye2Bg=
@@ -436,8 +434,6 @@ github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg=
 github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
 github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
-github.com/lightninglabs/neutrino v0.16.0 h1:YNTQG32fPR/Zg0vvJVI65OBH8l3U18LSXXtX91hx0q0=
-github.com/lightninglabs/neutrino v0.16.0/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk=
 github.com/lightninglabs/neutrino/cache v1.1.1 h1:TllWOSlkABhpgbWJfzsrdUaDH2fBy/54VSIB4vVqV8M=
 github.com/lightninglabs/neutrino/cache v1.1.1/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo=
 github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wleRN1L2fJXd6ZoQ9ZegVFTAb2bOQfruJPKcY=
@@ -635,6 +631,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
 github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
+github.com/ziggie1984/btcwallet v0.14.1-0.20231213185304-7f7ebd14e3d9 h1:C6Ace1TNb9C5Mp7R0NUJ8AbMDy8ngCPyVj2gKe+L5uE=
+github.com/ziggie1984/btcwallet v0.14.1-0.20231213185304-7f7ebd14e3d9/go.mod h1:1CBJ4adW5Arj8RKwqCqRECpL31jiGi0n5VzxGS3EscI=
+github.com/ziggie1984/neutrino v0.15.1-0.20231213184926-ca5f91e88713 h1:gAm/ee+gV+p6w5oP6ryrNL3PrTlbxdXOTVecE+djIb8=
+github.com/ziggie1984/neutrino v0.15.1-0.20231213184926-ca5f91e88713/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk=
 gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=
 gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=
 go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
diff --git a/routing/router.go b/routing/router.go
index 5b52cfb8f0..9353e61229 100644
--- a/routing/router.go
+++ b/routing/router.go
@@ -1807,11 +1807,18 @@ func (r *ChannelRouter) fetchFundingTx(
 	if err != nil {
 		return nil, err
 	}
+
+	log.Infof("Fetching block with hash=%v for short chan_id=%v(%v)",
+		blockHash, chanID, chanID.ToUint64())
+
 	fundingBlock, err := r.cfg.Chain.GetBlock(blockHash)
 	if err != nil {
 		return nil, err
 	}
 
+	log.Infof("Successfully fetched block with hash=%v for short "+
+		"chan_id=%v(%v)", blockHash, chanID, chanID.ToUint64())
+
 	// As a sanity check, ensure that the advertised transaction index is
 	// within the bounds of the total number of transactions within a
 	// block.