message: op-node: Add L1BlockRefFromHeader
diff: @@ -4,6 +4,7 @@ import (
  "fmt"
  "github.com/ethereum/go-ethereum/common"
  + "github.com/ethereum/go-ethereum/core/types"
  )
  type BlockID struct {
  @@ -47,6 +48,15 @@ type L1BlockRef struct {
  Time uint64 `json:"timestamp"`
  }
  +func L1BlockRefFromHeader(block *types.Header) L1BlockRef {
  + return L1BlockRef{
  + Hash: block.Hash(),
  + Number: block.Number.Uint64(),
  + ParentHash: block.ParentHash,
  + Time: block.Time,
  + }
  +}
  +
  func (id L1BlockRef) String() string {
  return fmt.Sprintf("%s:%d", id.Hash.String(), id.Number)
  }
  