Skip to content

Finish refactoring of SendRequest #4060

Description

@msgilligan

Proposed goals:

  1. Make instances of SendRequest fully immutable.
  2. Remove dependency on Context (which is ThreadLocal)
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIContextRelated to removal of the ThreadLocal Context object

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions