Proposed goals:
- Make instances of
SendRequest fully immutable.
- Remove dependency on
Context (which is ThreadLocal)
- Replace static factory methods with a
SendRequest(Builder|Factory) interface
Goal 3 is a proposed method to implement Goal 2. The idea is that the Wallet class could implement this method and that would be used for generating SendRequests in the context of a Wallet instance. The other use cases (I believe) are all tests, so in test setup an instance of the builder/factory could be created and used for the tests. I'm hoping the factory/builder can be simple (i.e. all methods return SendRequest there is no multiple-step or chained building.)
I believe this will allow us to deprecate and remove the getFeePerKb() and isEnsureMinRequiredFee() methods of Context.
Proposed goals:
SendRequestfully immutable.Context(which isThreadLocal)SendRequest(Builder|Factory)interfaceGoal 3 is a proposed method to implement Goal 2. The idea is that the
Walletclass could implement this method and that would be used for generating SendRequests in the context of aWalletinstance. The other use cases (I believe) are all tests, so in test setup an instance of the builder/factory could be created and used for the tests. I'm hoping the factory/builder can be simple (i.e. all methods returnSendRequestthere is no multiple-step or chained building.)I believe this will allow us to deprecate and remove the
getFeePerKb()andisEnsureMinRequiredFee()methods ofContext.