We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f8f137 commit 6b39e92Copy full SHA for 6b39e92
beacon/engine/types.go
@@ -19,6 +19,7 @@ package engine
19
import (
20
"fmt"
21
"math/big"
22
+ "slices"
23
24
"github.com/ethereum/go-ethereum/common"
25
"github.com/ethereum/go-ethereum/common/hexutil"
@@ -132,12 +133,7 @@ func (b PayloadID) Version() PayloadVersion {
132
133
134
// Is returns whether the identifier matches any of provided payload versions.
135
func (b PayloadID) Is(versions ...PayloadVersion) bool {
- for _, v := range versions {
136
- if v == b.Version() {
137
- return true
138
- }
139
140
- return false
+ return slices.Contains(versions, b.Version())
141
}
142
143
func (b PayloadID) String() string {
0 commit comments