From 7f7ebd14e3d9a4b2d7cf9912902662a4bc6855c3 Mon Sep 17 00:00:00 2001 From: ziggie Date: Sun, 10 Dec 2023 14:14:54 +0100 Subject: [PATCH] chain: bump neutrino version and increase logs. --- chain/bitcoind_conn.go | 3 +++ chain/pruned_block_dispatcher.go | 6 ++++-- go.mod | 2 ++ go.sum | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/chain/bitcoind_conn.go b/chain/bitcoind_conn.go index 88edf1b05a..13aadf502e 100644 --- a/chain/bitcoind_conn.go +++ b/chain/bitcoind_conn.go @@ -469,6 +469,9 @@ func (c *BitcoindConn) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) { return nil, err } + log.Infof("Block with hash=%v was not found on our local backend, "+ + "now querying bitcoin peers directly", hash) + // Now that we know the block has been pruned for sure, request it from // our backend peers. blockChan, errChan := c.prunedBlockDispatcher.Query( diff --git a/chain/pruned_block_dispatcher.go b/chain/pruned_block_dispatcher.go index 9c2d5e6168..7d9d04ad50 100644 --- a/chain/pruned_block_dispatcher.go +++ b/chain/pruned_block_dispatcher.go @@ -542,13 +542,13 @@ func (d *PrunedBlockDispatcher) newRequest(blocks []*chainhash.Hash) ( } if _, ok := d.blocksQueried[*block]; !ok { - log.Debugf("Queuing new block %v for request", *block) + log.Infof("Queuing new block %v for request", *block) inv := wire.NewInvVect(wire.InvTypeWitnessBlock, block) if err := getData.AddInvVect(inv); err != nil { return nil, nil, err } } else { - log.Debugf("Received new request for pending query of "+ + log.Infof("Received new request for pending query of "+ "block %v", *block) } @@ -609,6 +609,8 @@ func (d *PrunedBlockDispatcher) handleResp(req, resp wire.Message, blockChans, ok := d.blocksQueried[blockHash] if !ok { d.blockMtx.Unlock() + log.Warnf("Received block %v from peer %v but is not in our "+ + "query list(ok=%b)", blockHash, peer, ok) return query.Progress{ Progressed: false, Finished: false, diff --git a/go.mod b/go.mod index 99ac697bde..045e47e27e 100644 --- a/go.mod +++ b/go.mod @@ -52,3 +52,5 @@ require ( ) go 1.18 + +replace github.com/lightninglabs/neutrino v0.16.0 => github.com/ziggie1984/neutrino v0.15.1-0.20231213184926-ca5f91e88713 diff --git a/go.sum b/go.sum index 0eebc143e0..e44a39445f 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/lightningnetwork/lnd/clock v1.0.1 h1:QQod8+m3KgqHdvVMV+2DRNNZS1GRFir8mHZYA+Z2hFo= @@ -134,6 +132,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +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= go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=