|
|
@ -19,6 +19,7 @@ package engine |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"math/big" |
|
|
|
"math/big" |
|
|
|
|
|
|
|
"slices" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
@ -132,12 +133,7 @@ func (b PayloadID) Version() PayloadVersion { |
|
|
|
|
|
|
|
|
|
|
|
// Is returns whether the identifier matches any of provided payload versions.
|
|
|
|
// Is returns whether the identifier matches any of provided payload versions.
|
|
|
|
func (b PayloadID) Is(versions ...PayloadVersion) bool { |
|
|
|
func (b PayloadID) Is(versions ...PayloadVersion) bool { |
|
|
|
for _, v := range versions { |
|
|
|
return slices.Contains(versions, b.Version()) |
|
|
|
if v == b.Version() { |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (b PayloadID) String() string { |
|
|
|
func (b PayloadID) String() string { |
|
|
|