Commit 8936551c authored by protolambda's avatar protolambda

op-node: channel ID terminal string

parent 86648263
...@@ -32,8 +32,8 @@ type ChannelOut struct { ...@@ -32,8 +32,8 @@ type ChannelOut struct {
closed bool closed bool
} }
func (co *ChannelOut) ID() string { func (co *ChannelOut) ID() ChannelID {
return co.id.String() return co.id
} }
func NewChannelOut(channelTime uint64) (*ChannelOut, error) { func NewChannelOut(channelTime uint64) (*ChannelOut, error) {
......
...@@ -5,8 +5,6 @@ import ( ...@@ -5,8 +5,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"strconv" "strconv"
"github.com/ethereum-optimism/optimism/op-node/eth"
) )
// count the tagging info as 200 in terms of buffer size. // count the tagging info as 200 in terms of buffer size.
...@@ -68,8 +66,7 @@ func (id *ChannelID) UnmarshalText(text []byte) error { ...@@ -68,8 +66,7 @@ func (id *ChannelID) UnmarshalText(text []byte) error {
return nil return nil
} }
type TaggedData struct { // TerminalString implements log.TerminalStringer, formatting a string for console output during logging.
L1Origin eth.L1BlockRef func (id ChannelID) TerminalString() string {
ChannelID ChannelID return fmt.Sprintf("%x..%x-%d", id.Data[:3], id.Data[29:], id.Time)
Data []byte
} }
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