delete witness encode and decode methods

This commit is contained in:
maskpp 2025-09-24 08:41:51 +08:00
parent a0b180c68a
commit c94a8f3a6e

View file

@ -17,12 +17,10 @@
package stateless package stateless
import ( import (
"io"
"slices" "slices"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
) )
// ToExtWitness converts our internal witness representation to the consensus one. // ToExtWitness converts our internal witness representation to the consensus one.
@ -34,16 +32,6 @@ func (w *Witness) ToExtWitness() *ExtWitness {
} }
} }
// EncodeRLP serializes a witness as RLP.
func (w *Witness) EncodeRLP(wr io.Writer) error {
return rlp.Encode(wr, w)
}
// DecodeRLP decodes a witness from RLP.
func (w *Witness) DecodeRLP(s *rlp.Stream) error {
return s.Decode(&w)
}
// ExtWitness is a witness RLP encoding for transferring across clients. // ExtWitness is a witness RLP encoding for transferring across clients.
type ExtWitness struct { type ExtWitness struct {
Headers []*types.Header `json:"headers"` Headers []*types.Header `json:"headers"`