Support JSON-RPC verifier#67
Conversation
|
Oh, can we actually replace most of the |
Ah whoops, I thought it was strange this wasn't using that. I assumed there was some important difference. Will give it a shot. |
|
It's appears to be impossible to use GossipVerifier here. The GossipVerifier assumes your PeerManager will use a Unless there's some simple way to get around this maybe we can push this change to later? I could see relaxing the PeerManager constraint on GossipVerifier to be edit Actually, I guess we can give the outbound gossiper to GossipVerifier as the gossiper but still need to a way to relax the PeerManager constraints edit again I just opened this to fix this (I think): lightningdevkit/rust-lightning#2773 |
| enum AnyChainSource { | ||
| Rest(RestClient), | ||
| Rpc(RpcClient), | ||
| } |
There was a problem hiding this comment.
Could we use a type parameter instead of introducing an enum?
There was a problem hiding this comment.
Yes, but it bleeds into the entire application and felt unnecessary when RGS is a binary and not really a lib. But I can go back and do this if you think it's better once we resolve the GossipVerifier issues.
|
LGTM. Needs a trivial rebase, however. |
|
Any desire to rebase this? |
BlockSourceandUtxoSourcetraits which the RestClient and RpcClient both implement. Removing the unnecessary manual implementation of getblockbyhash.BlockSourceandUtxoSourcethat the verifier can use.The default behavior of using RestClient is unchanged. This allows a user to switch to the RpcClient by setting
USE_BITCOIN_RPC_APIto "true" and providing the variousBITCOIN_RPC_*vars (host, port, path, user, password).