FISCO-BCOS / FISCO-BCOS/java-sdk

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

Aperta
#952 0 commenti 1 reazione 2 assegnatari Rivendicata da @kyonRay Vedi su GitHub
bug
Lingua principale
Java
Stelle
58
Fork
62
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

```java
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).

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.