-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JSON-RPC verifier #67
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use a type parameter instead of introducing an enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
BlockSource
andUtxoSource
traits which the RestClient and RpcClient both implement. Removing the unnecessary manual implementation of getblockbyhash.BlockSource
andUtxoSource
that 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_API
to "true" and providing the variousBITCOIN_RPC_*
vars (host, port, path, user, password).