Skip to content

Commit e8eee85

Browse files
jtragliarolfyone
andauthored
Fix minor nits in new electra state changes (Consensys#8194)
Co-authored-by: Paul Harris <[email protected]>
1 parent 49a6665 commit e8eee85

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Diff for: data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingConsolidation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public PendingConsolidation(
4747
spec.getSchemaDefinitions().toVersionElectra();
4848
if (schemaDefinitionsElectra.isEmpty()) {
4949
throw new IllegalArgumentException(
50-
"Could not create PendingBalanceDeposit for pre-electra spec");
50+
"Could not create PendingConsolidation for pre-electra spec");
5151
}
5252
return schemaDefinitionsElectra
5353
.get()

Diff for: data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingPartialWithdrawal.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public PendingPartialWithdrawal(
5353
spec.getSchemaDefinitions().toVersionElectra();
5454
if (schemaDefinitionsElectra.isEmpty()) {
5555
throw new IllegalArgumentException(
56-
"Could not create PendingBalanceDeposit for pre-electra spec");
56+
"Could not create PendingPartialWithdrawal for pre-electra spec");
5757
}
5858
return schemaDefinitionsElectra
5959
.get()

Diff for: ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/common/BeaconStateFields.java

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public enum BeaconStateFields implements SszFieldName {
7171
HISTORICAL_SUMMARIES,
7272
// Electra fields
7373
DEPOSIT_RECEIPTS_START_INDEX,
74-
7574
DEPOSIT_BALANCE_TO_CONSUME,
7675
EXIT_BALANCE_TO_CONSUME,
7776
EARLIEST_EXIT_EPOCH,

Diff for: ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/state/beaconstate/versions/electra/MutableBeaconStateElectra.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ static MutableBeaconStateElectra required(final MutableBeaconState state) {
3737
@Override
3838
BeaconStateElectra commitChanges();
3939

40+
@Override
41+
default Optional<MutableBeaconStateElectra> toMutableVersionElectra() {
42+
return Optional.of(this);
43+
}
44+
4045
default void setDepositReceiptsStartIndex(final UInt64 depositReceiptsStartIndex) {
4146
final int fieldIndex =
4247
getSchema().getFieldIndex(BeaconStateFields.DEPOSIT_RECEIPTS_START_INDEX);
4348
set(fieldIndex, SszUInt64.of(depositReceiptsStartIndex));
4449
}
4550

46-
@Override
47-
default Optional<MutableBeaconStateElectra> toMutableVersionElectra() {
48-
return Optional.of(this);
49-
}
50-
5151
default void setDepositBalanceToConsume(final UInt64 depositBalanceToConsume) {
5252
final int fieldIndex = getSchema().getFieldIndex(BeaconStateFields.DEPOSIT_BALANCE_TO_CONSUME);
5353
set(fieldIndex, SszUInt64.of(depositBalanceToConsume));

0 commit comments

Comments
 (0)