diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eeff81a86..07e8ac7bf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionCompleteResult.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionCompleteResult.java index 2a08d63c56..4a6db2ecce 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionCompleteResult.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionCompleteResult.java @@ -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; diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionPendingResult.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionPendingResult.java index 1fdc85b11c..683ea77661 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionPendingResult.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/TransactionPendingResult.java @@ -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());