Skip to content

Commit

Permalink
Move enter and leave list to inner method as pr suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
  • Loading branch information
Gabriel-Trintinalia committed Sep 8, 2023
1 parent c99cb7c commit 80a10b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ public class BlobPooledTransactionDecoder {
public static Transaction decode(final RLPInput input) {
input.enterList();
final Transaction.Builder builder = Transaction.builder();
input.enterList();
BlobTransactionDecoder.readTransactionPayloadInner(builder, input);
input.leaveList();
List<Blob> blobs = input.readList(Blob::readFrom);
List<KZGCommitment> commitments = input.readList(KZGCommitment::readFrom);
List<KZGProof> proofs = input.readList(KZGProof::readFrom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public class BlobTransactionDecoder {
*/
public static Transaction decode(final RLPInput input) {
Transaction transaction;
input.enterList();
transaction = readTransactionPayload(input);
input.leaveList();
return transaction;
}

Expand All @@ -62,6 +60,7 @@ private static Transaction readTransactionPayload(final RLPInput input) {
* @param input the RLP input to read from
*/
static void readTransactionPayloadInner(final Transaction.Builder builder, final RLPInput input) {
input.enterList();
builder
.type(TransactionType.BLOB)
.chainId(input.readBigIntegerScalar())
Expand Down Expand Up @@ -95,5 +94,6 @@ static void readTransactionPayloadInner(final Transaction.Builder builder, final
input.readUInt256Scalar().toUnsignedBigInteger(),
input.readUInt256Scalar().toUnsignedBigInteger(),
recId));
input.leaveList();
}
}

0 comments on commit 80a10b8

Please sign in to comment.