Commit 8936551c authored by protolambda's avatar protolambda

op-node: channel ID terminal string

parent 86648263
......@@ -32,8 +32,8 @@ type ChannelOut struct {
closed bool
}
func (co *ChannelOut) ID() string {
return co.id.String()
func (co *ChannelOut) ID() ChannelID {
return co.id
}
func NewChannelOut(channelTime uint64) (*ChannelOut, error) {
......
......@@ -5,8 +5,6 @@ import (
"errors"
"fmt"
"strconv"
"github.com/ethereum-optimism/optimism/op-node/eth"
)
// count the tagging info as 200 in terms of buffer size.
......@@ -68,8 +66,7 @@ func (id *ChannelID) UnmarshalText(text []byte) error {
return nil
}
type TaggedData struct {
L1Origin eth.L1BlockRef
ChannelID ChannelID
Data []byte
// TerminalString implements log.TerminalStringer, formatting a string for console output during logging.
func (id ChannelID) TerminalString() string {
return fmt.Sprintf("%x..%x-%d", id.Data[:3], id.Data[29:], id.Time)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment