Skip to content

Commit

Permalink
remove unused parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Sep 21, 2023
1 parent 5b97a23 commit 27a673c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ Optional<List<WithdrawalAdapter>> getWithdrawals(final DataFetchingEnvironment e
.map(wl -> wl.stream().map(WithdrawalAdapter::new).toList()));
}

public Optional<Long> getBlobGasUsed(final DataFetchingEnvironment environment) {
public Optional<Long> getBlobGasUsed() {
return header.getBlobGasUsed();
}

public Optional<Long> getExcessBlobGas(final DataFetchingEnvironment environment) {
public Optional<Long> getExcessBlobGas() {
return header.getExcessBlobGas().map(BlobGas::toLong);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.apache.tuweni.bytes.Bytes;

@SuppressWarnings("unused") // reflected by GraphQL
class CallResult {
public class CallResult {
private final Long status;
private final Long gasUsed;
private final Bytes data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public Optional<Bytes> getRawReceipt(final DataFetchingEnvironment environment)
});
}

public List<VersionedHash> getBlobVersionedHashes(final DataFetchingEnvironment environment) {
public List<VersionedHash> getBlobVersionedHashes() {
return transactionWithMetadata.getTransaction().getVersionedHashes().orElse(List.of());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void blobData() throws Exception {

final Optional<NormalBlockAdapter> maybeBlock = fetcher.get(environment);
assertThat(maybeBlock).isPresent();
assertThat(maybeBlock.get().getBlobGasUsed(environment)).contains(blobGasUsed);
assertThat(maybeBlock.get().getExcessBlobGas(environment)).contains(excessBlobGas);
assertThat(maybeBlock.get().getBlobGasUsed()).contains(blobGasUsed);
assertThat(maybeBlock.get().getExcessBlobGas()).contains(excessBlobGas);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void emptyBlobs() throws Exception {

var transactionData = fetcher.get(environment);
assertThat(transactionData).isPresent();
assertThat(transactionData.get().getBlobVersionedHashes(environment)).isEmpty();
assertThat(transactionData.get().getBlobVersionedHashes()).isEmpty();
assertThat(transactionData.get().getBlobGasUsed(environment)).isEmpty();
assertThat(transactionData.get().getBlobGasPrice(environment)).isEmpty();
assertThat(transactionData.get().getMaxFeePerBlobGas()).isEmpty();
Expand Down Expand Up @@ -115,7 +115,7 @@ void hasZeroBlobs() throws Exception {

var transactionData = fetcher.get(environment);
assertThat(transactionData).isPresent();
assertThat(transactionData.get().getBlobVersionedHashes(environment)).isEmpty();
assertThat(transactionData.get().getBlobVersionedHashes()).isEmpty();
assertThat(transactionData.get().getBlobGasUsed(environment)).contains(0L);
assertThat(transactionData.get().getBlobGasPrice(environment)).contains(Wei.ZERO);
assertThat(transactionData.get().getMaxFeePerBlobGas()).contains(Wei.ZERO);
Expand Down Expand Up @@ -149,7 +149,7 @@ void hasOneBlob() throws Exception {

var transactionData = fetcher.get(environment);
assertThat(transactionData).isPresent();
assertThat(transactionData.get().getBlobVersionedHashes(environment))
assertThat(transactionData.get().getBlobVersionedHashes())
.containsExactly(fakeVersionedHash);
assertThat(transactionData.get().getBlobGasUsed(environment)).contains(blobGasUsed);
assertThat(transactionData.get().getBlobGasPrice(environment)).contains(blobGasPrice);
Expand Down

0 comments on commit 27a673c

Please sign in to comment.