Always return a transaction type for pending transactions (#4364)

* always return a transaction type for pending transactions

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
pull/4520/head
Daniel Lehrner 2 years ago committed by GitHub
parent 7a2db24695
commit 4b20e77a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 3
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionCompleteResult.java
  3. 5
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionPendingResult.java

@ -13,7 +13,8 @@
### Bug Fixes
- Corrects emission of blockadded events when rewinding during a re-org. Fix for [#4495](https://github.com/hyperledger/besu/issues/4495)
-
- Always return a transaction type for pending transactions [#4364](https://github.com/hyperledger/besu/pull/4364)
### Download Links

@ -79,10 +79,7 @@ public class TransactionCompleteResult implements TransactionResult {
private final String raw;
private final String to;
private final String transactionIndex;
@JsonInclude(JsonInclude.Include.NON_NULL)
private final String type;
private final String value;
private final String v;
private final String r;

@ -68,10 +68,7 @@ public class TransactionPendingResult implements TransactionResult {
private final String publicKey;
private final String raw;
private final String to;
@JsonInclude(JsonInclude.Include.NON_NULL)
private final String type;
private final String value;
private final String v;
private final String r;
@ -97,7 +94,7 @@ public class TransactionPendingResult implements TransactionResult {
this.to = transaction.getTo().map(Address::toHexString).orElse(null);
this.type =
transactionType.equals(TransactionType.FRONTIER)
? null
? Quantity.create(0)
: Quantity.create(transactionType.getSerializedType());
this.value = Quantity.create(transaction.getValue());
this.v = Quantity.create(transaction.getV());

Loading…
Cancel
Save