[ETCM-215] faucet rpc client#798
Conversation
| maybeSslContext.fold(Http().defaultClientHttpsContext)(ConnectionContext.httpsClient) | ||
|
|
||
| def shutdown(): Unit = { | ||
| Await.ready(system.terminate(), 5.seconds) |
There was a problem hiding this comment.
It will be better if e use timeout from config (ex. mantis.shutdown-timeout)
There was a problem hiding this comment.
BTW I can't find where it is used and I am not sure that this code should be able to terminate system passed to the class from outside.
There was a problem hiding this comment.
I am not sure if we need this function called “shutdown()”. What do you think? Do we need it?
There was a problem hiding this comment.
I think we don't need it. It should be done at some higher level class
There was a problem hiding this comment.
This function called “shutdown” was used only in the “mallet” module. But mallet now uses the class “RpcClientMallet”. This client needs the “shutdown” function.
But we have pending removal of this module in task “ETCM-423”. So I removed this function that is not used.
Description
The faucet uses RpcClient to connect with the node. We had a RpcClient in the module “mallet”. This client is not async, it makes a “await” (blockin the threads) for all requests. Also it has not implemented the ssl behavior when connected with node secure (https).
Proposed Solution
Important Changes Introduced
Change the name of ssl properties. And add new ssl context used for rpc client from “faucet”.
Testing
ssl regression in faucet and node