Files
zeekay 027910d3b4 Fix crypto type mismatch and abigen template issues
- Fix cmd/abigen to use common.Keccak256Hash instead of crypto.Keccak256Hash
  (crypto.Hash.String() has no 0x prefix, causing wrong library pattern lookup)
- Update abigen source templates to use luxfi/geth imports
- Update testdata files to use luxfi/geth imports
- Regenerate internal bindings with fixed library dependency references
- Fix unused crypto imports in test files
- Add common import to test cases using common.PubkeyToAddress
- Fix cmd/ethkey and cmd/workload to use common.Keccak256Hash
2025-12-13 05:57:26 +00:00

83 lines
1.6 KiB
Plaintext

package test
import "github.com/luxfi/geth/common"
import "github.com/luxfi/geth/eth"
import "github.com/luxfi/geth/rlp"
import "io"
import eth1 "github.com/luxfi/geth/eth/protocols/eth"
func (obj *Test) EncodeRLP(_w io.Writer) error {
w := rlp.NewEncoderBuffer(_w)
_tmp0 := w.List()
_tmp1 := w.List()
w.ListEnd(_tmp1)
_tmp2 := w.List()
w.WriteUint64(obj.B.RequestId)
_tmp3 := w.List()
for _, _tmp4 := range obj.B.GetReceiptsRequest {
w.WriteBytes(_tmp4[:])
}
w.ListEnd(_tmp3)
w.ListEnd(_tmp2)
w.ListEnd(_tmp0)
return w.Flush()
}
func (obj *Test) DecodeRLP(dec *rlp.Stream) error {
var _tmp0 Test
{
if _, err := dec.List(); err != nil {
return err
}
// A:
var _tmp1 eth.MinerAPI
{
if _, err := dec.List(); err != nil {
return err
}
if err := dec.ListEnd(); err != nil {
return err
}
}
_tmp0.A = _tmp1
// B:
var _tmp2 eth1.GetReceiptsPacket
{
if _, err := dec.List(); err != nil {
return err
}
// RequestId:
_tmp3, err := dec.Uint64()
if err != nil {
return err
}
_tmp2.RequestId = _tmp3
// GetReceiptsRequest:
var _tmp4 []common.Hash
if _, err := dec.List(); err != nil {
return err
}
for dec.MoreDataInList() {
var _tmp5 common.Hash
if err := dec.ReadBytes(_tmp5[:]); err != nil {
return err
}
_tmp4 = append(_tmp4, _tmp5)
}
if err := dec.ListEnd(); err != nil {
return err
}
_tmp2.GetReceiptsRequest = _tmp4
if err := dec.ListEnd(); err != nil {
return err
}
}
_tmp0.B = _tmp2
if err := dec.ListEnd(); err != nil {
return err
}
}
*obj = _tmp0
return nil
}