Skip to content

Commit 6428663

Browse files
eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (#26696)
This change will break one hive test, but pass another and it will be the better way going forward
1 parent b40c109 commit 6428663

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

beacon/engine/errors.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ var (
7474
// - newPayloadV1: if the payload was accepted, but not processed (side chain)
7575
ACCEPTED = "ACCEPTED"
7676

77-
INVALIDBLOCKHASH = "INVALID_BLOCK_HASH"
78-
7977
GenericServerError = &EngineAPIError{code: -32000, msg: "Server error"}
8078
UnknownPayload = &EngineAPIError{code: -38001, msg: "Unknown payload"}
8179
InvalidForkChoiceState = &EngineAPIError{code: -38002, msg: "Invalid forkchoice state"}

eth/catalyst/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func (api *ConsensusAPI) newPayload(params engine.ExecutableData) (engine.Payloa
448448
block, err := engine.ExecutableDataToBlock(params)
449449
if err != nil {
450450
log.Debug("Invalid NewPayload params", "params", params, "error", err)
451-
return engine.PayloadStatusV1{Status: engine.INVALIDBLOCKHASH}, nil
451+
return engine.PayloadStatusV1{Status: engine.INVALID}, nil
452452
}
453453
// Stash away the last update to warn the user if the beacon client goes offline
454454
api.lastNewPayloadLock.Lock()

eth/catalyst/api_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,8 @@ func TestInvalidBloom(t *testing.T) {
864864
if err != nil {
865865
t.Fatal(err)
866866
}
867-
if status.Status != engine.INVALIDBLOCKHASH {
868-
t.Errorf("invalid status: expected VALID got: %v", status.Status)
867+
if status.Status != engine.INVALID {
868+
t.Errorf("invalid status: expected INVALID got: %v", status.Status)
869869
}
870870
}
871871

0 commit comments

Comments
 (0)