FISCO-BCOS / FISCO-BCOS/java-sdk

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

Offen
#952 0 Kommentare 1 Reaktion 2 zugewiesene Personen Beansprucht von @kyonRay Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
58
Forks
62
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.