Commit graph

2 commits

Author SHA1 Message Date
Wilmer Paulino
526d132f09
chain: implement GetNodeAddresses fallback for PrunedBlockDispatcher
It's possible for bitcoind instances to only have connections to pruned
nodes after its initial block download, which are incompatible with the
PrunedBlockDispatcher. This would result in GetBlock requests for pruned
blocks to never resolve. Since bitcoind also exposes a GetNodeAddresses
RPC, which returns random reachable addresses from its address manager,
we can leverage it to obtain a new candidate set of peers that we
otherwise wouldn't obtain through GetPeers.
2021-04-23 13:28:56 -07:00
Wilmer Paulino
178d124b76
chain: add PrunedBlockDispatcher implementation
To minimally support wallets connected to pruned nodes, we add a new
subsystem that can be integrated with chain clients to request blocks
that the server has already pruned. This is done by connecting to the
server's full node peers and querying them directly. Ideally, this is a
capability supported by the server, though this is not yet possible with
bitcoind.
2021-04-02 17:28:05 -07:00