Skip to content

AssembleEIP1559TransactionService has a package-private constructor and is never instantiated (unusable by consumers) #952

@kyonRay

Description

@kyonRay

Description

org.fisco.bcos.sdk.v3.transaction.manager.transactionv1.AssembleEIP1559TransactionService cannot be instantiated by SDK consumers: its only constructor is package-private —

AssembleEIP1559TransactionService(Client client) { ... }   // no `public`

— and no public factory or call site in src/main constructs it (there is no new AssembleEIP1559TransactionService(...) anywhere in main code).

Impact

The EIP-1559 transaction service (deploy/send EIP-1559 transactions: deployContractEIP1559, sendEIP1559Transaction, and async variants) is unreachable from outside its own package, so users cannot use it directly, and it is untestable from other packages.

Suggested fix

Either make the constructor public, or expose it through a factory (e.g. TransactionManagerFactory / TransactionProcessorFactory) that returns an AssembleEIP1559TransactionService, mirroring how AssembleTransactionService / DefaultTransactionManager are obtained.

Found via

Attempting to write a test for the EIP-1559 service during #947 (the test had to be placed inside the ...transactionv1 package just to reach the constructor).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions