Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter name for forkchoiceUpdatedV4 #8811

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -45,13 +45,13 @@ public PayloadAttributesV4(
final @JsonProperty("suggestedFeeRecipient") Bytes20 suggestedFeeRecipient,
final @JsonProperty("withdrawals") List<WithdrawalV1> 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;
}

Expand Down Expand Up @@ -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
Expand All @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down