From 5c6969183b2cb244bf10292435a53f931614b30b Mon Sep 17 00:00:00 2001 From: Lucas Saldanha Date: Mon, 4 Nov 2024 17:51:41 +1300 Subject: [PATCH] Rebase + Fix (#8813) --- .../schema/PayloadAttributesV4.java | 14 +++++++------- .../schema/PayloadAttributesV4Test.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4.java index 47e98eaad44..e3ed4caa59f 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4.java @@ -33,7 +33,7 @@ public class PayloadAttributesV4 extends PayloadAttributesV3 { @JsonSerialize(using = UInt64AsHexSerializer.class) @JsonDeserialize(using = UInt64AsHexDeserializer.class) - public final UInt64 targetBlockCount; + public final UInt64 targetBlobCount; @JsonSerialize(using = UInt64AsHexSerializer.class) @JsonDeserialize(using = UInt64AsHexDeserializer.class) @@ -45,13 +45,13 @@ public PayloadAttributesV4( final @JsonProperty("suggestedFeeRecipient") Bytes20 suggestedFeeRecipient, final @JsonProperty("withdrawals") List withdrawals, final @JsonProperty("parentBeaconBlockRoot") Bytes32 parentBeaconBlockRoot, - final @JsonProperty("targetBlobCount") UInt64 targetBlockCount, + final @JsonProperty("targetBlobCount") UInt64 targetBlobCount, final @JsonProperty("maximumBlobCount") UInt64 maximumBlobCount) { super(timestamp, prevRandao, suggestedFeeRecipient, withdrawals, parentBeaconBlockRoot); - checkNotNull(targetBlockCount, "targetBlockCount"); + checkNotNull(targetBlobCount, "targetBlobCount"); checkNotNull(maximumBlobCount, "maximumBlobCount"); - this.targetBlockCount = targetBlockCount; + this.targetBlobCount = targetBlobCount; this.maximumBlobCount = maximumBlobCount; } @@ -91,13 +91,13 @@ public boolean equals(final Object o) { return false; } final PayloadAttributesV4 that = (PayloadAttributesV4) o; - return Objects.equals(targetBlockCount, that.targetBlockCount) + return Objects.equals(targetBlobCount, that.targetBlobCount) && Objects.equals(maximumBlobCount, that.maximumBlobCount); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), targetBlockCount, maximumBlobCount); + return Objects.hash(super.hashCode(), targetBlobCount, maximumBlobCount); } @Override @@ -108,7 +108,7 @@ public String toString() { .add("suggestedFeeRecipient", suggestedFeeRecipient) .add("withdrawals", withdrawals) .add("parentBeaconBlockRoot", parentBeaconBlockRoot) - .add("targetBlockCount", targetBlockCount) + .add("targetBlobCount", targetBlobCount) .add("maximumBlobCount", maximumBlobCount) .toString(); } diff --git a/ethereum/executionclient/src/test/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4Test.java b/ethereum/executionclient/src/test/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4Test.java index f9eca48edab..a02d7cd6308 100644 --- a/ethereum/executionclient/src/test/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4Test.java +++ b/ethereum/executionclient/src/test/java/tech/pegasys/teku/ethereum/executionclient/schema/PayloadAttributesV4Test.java @@ -94,7 +94,7 @@ public void buildFromInternalPayload_HasCorrectValues() { assertThat(payloadBuildingAttributes.getParentBeaconBlockRoot()) .isEqualTo(payloadAttributesV4.parentBeaconBlockRoot); assertThat(payloadBuildingAttributes.getTargetBlobCount()) - .hasValue(payloadAttributesV4.targetBlockCount); + .hasValue(payloadAttributesV4.targetBlobCount); assertThat(payloadBuildingAttributes.getMaximumBlobCount()) .hasValue(payloadAttributesV4.maximumBlobCount); }