Skip to content

Commit

Permalink
Refactor transaction pool tests (#4632)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 authored Nov 10, 2022
1 parent b181f99 commit fe0b628
Show file tree
Hide file tree
Showing 5 changed files with 1,195 additions and 1,242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class TransactionTestFixture {
private Optional<Wei> maxPriorityFeePerGas = Optional.empty();
private Optional<Wei> maxFeePerGas = Optional.empty();

private Optional<BigInteger> v = Optional.empty();

public Transaction createTransaction(final KeyPair keys) {
final Transaction.Builder builder = Transaction.builder();
builder
Expand All @@ -63,6 +65,8 @@ public Transaction createTransaction(final KeyPair keys) {
maxPriorityFeePerGas.ifPresent(builder::maxPriorityFeePerGas);
maxFeePerGas.ifPresent(builder::maxFeePerGas);

v.ifPresent(builder::v);

return builder.signAndBuild(keys);
}

Expand Down Expand Up @@ -120,4 +124,9 @@ public TransactionTestFixture maxFeePerGas(final Optional<Wei> maxFeePerGas) {
this.maxFeePerGas = maxFeePerGas;
return this;
}

public TransactionTestFixture v(final Optional<BigInteger> v) {
this.v = v;
return this;
}
}
Loading

0 comments on commit fe0b628

Please sign in to comment.