diff --git a/beacon-chain/rpc/lookup/stater.go b/beacon-chain/rpc/lookup/stater.go index b0fd36b6cdb4..a3bd0f250fb1 100644 --- a/beacon-chain/rpc/lookup/stater.go +++ b/beacon-chain/rpc/lookup/stater.go @@ -82,8 +82,8 @@ type StateRootNotFoundError struct { } // NewStateRootNotFoundError creates a new error instance. -func NewStateRootNotFoundError(stateRootsSize int) StateNotFoundError { - return StateNotFoundError{ +func NewStateRootNotFoundError(stateRootsSize int) StateRootNotFoundError { + return StateRootNotFoundError{ message: fmt.Sprintf("state root not found in the last %d state roots", stateRootsSize), } } diff --git a/changelog/Snezhkko_fix-type.md b/changelog/Snezhkko_fix-type.md new file mode 100644 index 000000000000..264398fb20c8 --- /dev/null +++ b/changelog/Snezhkko_fix-type.md @@ -0,0 +1,3 @@ +## Fixed + +- incorrect constructor return type [#16084](https://github.com/OffchainLabs/prysm/pull/16084)