erigon-pulse/trie/rlphacks/serializable.go

19 lines
386 B
Go

package rlphacks
import (
"io"
)
// RlpSerializableTape is an abstraction for a tape that allows reading a sequence of
// RlpSerializable values.
type RlpSerializableTape interface {
Next() (RlpSerializable, error)
}
// RlpSerializable is a value that can be double-RLP coded.
type RlpSerializable interface {
ToDoubleRLP(io.Writer) error
DoubleRLPLen() int
RawBytes() []byte
}