-
Notifications
You must be signed in to change notification settings - Fork 92
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
server: use decred's rpcclient for BTC #975
Conversation
7cb4b2f
to
e88abd3
Compare
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.
I had the simnet tests fail a few times while testing this, but not sure if related to these changes.
6560641
to
db499d8
Compare
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.
Does cloneCfg.FeeEstimator/estimateFee's signature work as estimateFee func(context.Context, RawRequester) (uint64, error)
? I'm not sure but maybe this would avoid a lot of exporting?
@JoeGruffins Thanks for the suggestion, was sure it's not idiomatic. |
You could also define a wrapper for callers that are not context-enabled so that it just uses the btc.Backend's subsystem shutdown context func (rc *RPCClient) RawRequest(string, []json.RawMessage) (json.RawMessage, error){
return rc.Requester.RawRequest(rc.ctx, method, params)
} So that BCH can do func estimateFee(node btc.RPCClient) (uint64, error) {
resp, err := node.RawRequest("estimatefee", nil) instead of func estimateFee(node btc.RPCClient) (uint64, error) {
resp, err := node.Requester.RawRequest(node.Ctx, "estimatefee", nil) |
@chappjc will do 💯 |
26df9e5
to
81b227f
Compare
@JoeGruffins @chappjc updated |
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.
Works for me.
81b227f
to
3d9a2f8
Compare
be9c236
to
beabd95
Compare
That's the second part of and closes #841, #938 was the first part and it
migrated the client to use decred's v6 context aware rpcclient.