btcsuite / btcwallet

A secure bitcoin wallet daemon written in Go (golang)
ISC License
1.15k stars 590 forks source link

chain: PrunedBlockDispatcher bugfix. #903

Closed ziggie1984 closed 10 months ago

ziggie1984 commented 10 months ago

This addresses #https://github.com/lightningnetwork/lnd/issues/8250.

(Still need to update the unittests).

So this does not address the related time issue for now which is acutally the case why the requests where failing in the first place.

I would add the new timing logic and introduce the getblockfrompeer command for bitcoind >24 (iirc) in a followup PR.

C-Otto commented 10 months ago

Note that caching is currently done in lnd: blockcache/blockcache.go

ziggie1984 commented 10 months ago

Refined the peer selection logic, to not waste time connecting to inbound peers and as well sort by pingtime, I think thats a quick win which prevents us running in this timeout issue in the first place.