Skip to content

Commit

Permalink
Fix parameter name for forkchoiceUpdatedV4
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha committed Nov 4, 2024
1 parent d668a4b commit e17248e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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

0 comments on commit e17248e

Please sign in to comment.