mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
Merge branch 'master'
This commit is contained in:
commit
0eb623e141
13 changed files with 239 additions and 33 deletions
|
|
@ -1 +1 @@
|
|||
0xd60e5310c5d52ced44cfb13be4e9f22a1e6a6dc56964c3cccd429182d26d72d0
|
||||
0x4bae4b97deda095724560012cab1f80a5221ce0a37a4b5236d8ab63f595f29d9
|
||||
1
beacon/params/checkpoint_hoodi.hex
Normal file
1
beacon/params/checkpoint_hoodi.hex
Normal file
|
|
@ -0,0 +1 @@
|
|||
0x1bbf958008172591b6cbdb3d8d52e26998258e83d4bdb9eec10969d84519a6bd
|
||||
|
|
@ -1 +1 @@
|
|||
0x02f0bb348b0d45f95a9b7e2bb5705768ad06548876cee03d880a2c9dabb1ff88
|
||||
0x2fe39a39b6f7cbd549e0f74d259de6db486005a65bd3bd92840dd6ce21d6f4c8
|
||||
|
|
@ -1 +1 @@
|
|||
0xa0dad451a230c01be6f2492980ec5bb412d8cf33351a75e8b172b5b84a5fd03a
|
||||
0x86686b2b366e24134e0e3969a9c5f3759f92e5d2b04785b42e22cc7d468c2107
|
||||
|
|
@ -31,6 +31,9 @@ var checkpointSepolia string
|
|||
//go:embed checkpoint_holesky.hex
|
||||
var checkpointHolesky string
|
||||
|
||||
//go:embed checkpoint_hoodi.hex
|
||||
var checkpointHoodi string
|
||||
|
||||
var (
|
||||
MainnetLightConfig = (&ChainConfig{
|
||||
GenesisValidatorsRoot: common.HexToHash("0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95"),
|
||||
|
|
@ -71,7 +74,7 @@ var (
|
|||
HoodiLightConfig = (&ChainConfig{
|
||||
GenesisValidatorsRoot: common.HexToHash("0x212f13fc4df078b6cb7db228f1c8307566dcecf900867401a92023d7ba99cb5f"),
|
||||
GenesisTime: 1742212800,
|
||||
Checkpoint: common.HexToHash(""),
|
||||
Checkpoint: common.HexToHash(checkpointHoodi),
|
||||
}).
|
||||
AddFork("GENESIS", 0, common.FromHex("0x10000910")).
|
||||
AddFork("ALTAIR", 0, common.FromHex("0x20000910")).
|
||||
|
|
|
|||
|
|
@ -18,5 +18,11 @@
|
|||
{"blockNumber": 3221725, "blockId": "0xe771f897dece48b1583cc1d1d10de8015da57407eb1fdf239fdbe46eaab85143", "firstIndex": 1140850137},
|
||||
{"blockNumber": 3357164, "blockId": "0x6252d0aa54c79623b0680069c88d7b5c47983f0d5c4845b6c811b8d9b5e8ff3c", "firstIndex": 1207959453},
|
||||
{"blockNumber": 3447019, "blockId": "0xeb7d585e1e063f3cc05ed399fbf6c2df63c271f62f030acb804e9fb1e74b6dc1", "firstIndex": 1275067542},
|
||||
{"blockNumber": 3546397, "blockId": "0xdabdef7defa4281180a57c5af121877b82274f15ccf074ea0096146f4c246df2", "firstIndex": 1342176778}
|
||||
{"blockNumber": 3546397, "blockId": "0xdabdef7defa4281180a57c5af121877b82274f15ccf074ea0096146f4c246df2", "firstIndex": 1342176778},
|
||||
{"blockNumber": 3867885, "blockId": "0x8be069dd7a3e2ffb869ee164d11b28555233d2510b134ab9d5484fdae55d2225", "firstIndex": 1409285539},
|
||||
{"blockNumber": 3935446, "blockId": "0xc91a61bc215bbcccc3020c62e5c8153162df0d8bcc59813d74671b2d24903ed7", "firstIndex": 1476394742},
|
||||
{"blockNumber": 3989508, "blockId": "0xc85dec36a767e44237842ef51915944c2a49780c8c394a3aa6cfb013c99cf58b", "firstIndex": 1543503452},
|
||||
{"blockNumber": 4057078, "blockId": "0xccdb79f6705629cb6ab1667a1244938f60911236549143fcff23a3989213e67e", "firstIndex": 1610612030},
|
||||
{"blockNumber": 4126499, "blockId": "0x92f2ef21fc911e87e81e38373d5f2915587b9648a0ab3cf4fcfe3e5aaffe7b85", "firstIndex": 1677720416},
|
||||
{"blockNumber": 4239335, "blockId": "0x64fbd22965eb583a584552b7edb9b7ce26fb6aad247c1063d0d5a4d11cbcc58c", "firstIndex": 1744830176}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -267,5 +267,26 @@
|
|||
{"blockNumber": 22168652, "blockId": "0x6ae43618c915e636794e2cc2d75dde9992766881c7405fe6479c045ed4bee57e", "firstIndex": 17850956277},
|
||||
{"blockNumber": 22190975, "blockId": "0x9437121647899a4b7b84d67fbea7cc6ff967481c2eab4328ccd86e2cefe19420", "firstIndex": 17918066140},
|
||||
{"blockNumber": 22234357, "blockId": "0x036030830134f9224160d5a0b62da35ec7813dc8855d554bd22e9d38545243ed", "firstIndex": 17985175075},
|
||||
{"blockNumber": 22276736, "blockId": "0x5ceb96d98aa1b4c1c2f2fa253ae9cdb1b04e0420c11bf795400e8762c0a1635c", "firstIndex": 18052284344}
|
||||
{"blockNumber": 22276736, "blockId": "0x5ceb96d98aa1b4c1c2f2fa253ae9cdb1b04e0420c11bf795400e8762c0a1635c", "firstIndex": 18052284344},
|
||||
{"blockNumber": 22321282, "blockId": "0x8a601ebf6a757020c6d43a978f0bd2c150c4acc1ffdd50c7ee88afc78b0c11f8", "firstIndex": 18119392242},
|
||||
{"blockNumber": 22349231, "blockId": "0xb751c026a92ba5be95ad7ea4e2729a175b0d0e11a4c108f47cab232b4715d1a2", "firstIndex": 18186501218},
|
||||
{"blockNumber": 22377469, "blockId": "0xa47916860a22f7e26761ec2d7f717410791bd3ed0237b2f6266750214c7bbf08", "firstIndex": 18253610249},
|
||||
{"blockNumber": 22422685, "blockId": "0x8beaee39603af55fad222730f556c840c41cd76a5eef0bad367ac94d3b86c7aa", "firstIndex": 18320716377},
|
||||
{"blockNumber": 22462378, "blockId": "0x6dba9c5d2949f5a6a072267b590e8b15e6fb157a0fc22719387f1fd6bfcd8d5d", "firstIndex": 18387828426},
|
||||
{"blockNumber": 22500185, "blockId": "0x2484c380df0a8f7edfdf8d917570d23fab8499aea80c35b6cf4e5fe1e34106e9", "firstIndex": 18454936227},
|
||||
{"blockNumber": 22539624, "blockId": "0xd418071906803d25afc3842a6a6468ad3b5fea27107b314ce4e2ccf08b478acf", "firstIndex": 18522044531},
|
||||
{"blockNumber": 22577021, "blockId": "0xff222982693f3ff60d2097822171f80a6ddd979080aeb7e995bfb1b973497c84", "firstIndex": 18589154438},
|
||||
{"blockNumber": 22614525, "blockId": "0x9868da1fea2ffca3f67e35570f02eb5707b27f6967ea4a109eb4ddbf24566efd", "firstIndex": 18656264174},
|
||||
{"blockNumber": 22652848, "blockId": "0x060a911da11ab0f1dda307f5196e622d23901d198925749e70ab58a439477c5a", "firstIndex": 18723372617},
|
||||
{"blockNumber": 22692432, "blockId": "0x6a937f2c283aba8c778c1f5ef340b225fd820f8a7dfa6f24f5fe541994f32f2d", "firstIndex": 18790480232},
|
||||
{"blockNumber": 22731200, "blockId": "0x00d57a9e7a2dad252436fe9f0382c6a8860d301a9f9ffe6d7ac64c82b95300f8", "firstIndex": 18857590076},
|
||||
{"blockNumber": 22769000, "blockId": "0xa48db20307c19c373ef2d31d85088ea14b8df0450491c31982504c87b04edbc0", "firstIndex": 18924699130},
|
||||
{"blockNumber": 22808126, "blockId": "0x1419c64ff003edca0586f1c8ec3063da5c54c57ff826cfb34bc866cc18949653", "firstIndex": 18991807807},
|
||||
{"blockNumber": 22845231, "blockId": "0x691f87217e61c5d7ae9ad53a44d30e1ab6b1cc3f2b689b9fbf7c38fbacacfe3e", "firstIndex": 19058917062},
|
||||
{"blockNumber": 22884189, "blockId": "0x7f102d44c0ea7803f5b0e1a98a6abf0e8383eb99fb114d6f7b4591753ce8bba3", "firstIndex": 19126024122},
|
||||
{"blockNumber": 22920923, "blockId": "0x04fe6179495016fc3fe56d8ef5311c360a5761a898262173849c3494fdd73d92", "firstIndex": 19193134595},
|
||||
{"blockNumber": 22958100, "blockId": "0xe38e0ff7b0c4065ca42ea577bc32f2566ca46f2ddeedcc4bc1f8fb00e7f26329", "firstIndex": 19260242424},
|
||||
{"blockNumber": 22988600, "blockId": "0x04ca74758b22e0ea54b8c992022ff21c16a2af9c45144c3b0f80de921a7eee82", "firstIndex": 19327351273},
|
||||
{"blockNumber": 23018392, "blockId": "0x61cc979b00bc97b48356f986a5b9ec997d674bc904c2a2e4b0f17de08e50b3bb", "firstIndex": 19394459627},
|
||||
{"blockNumber": 23048524, "blockId": "0x489de15d95739ede4ab15e8b5151d80d4dc85ae10e7be800b1a4723094a678df", "firstIndex": 19461570073}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -68,5 +68,32 @@
|
|||
{"blockNumber": 7911722, "blockId": "0x9a85e48e3135c97c51fc1786f2af0596c802e021b6c53cfca65a129cafcd23ed", "firstIndex": 4496287265},
|
||||
{"blockNumber": 7960147, "blockId": "0xc9359cc76d7090e1c8a031108f0ab7a8935d971efd4325fe53612a1d99562f6f", "firstIndex": 4563402388},
|
||||
{"blockNumber": 8030418, "blockId": "0x21867e68cd8327aed2da2601399d60f7f9e41dca4a4f2f9be982e5a2b9304a88", "firstIndex": 4630511616},
|
||||
{"blockNumber": 8087701, "blockId": "0x0fa8c8d7549cc9a8d308262706fe248efe759f8b63511efb1e7f3926e9af2dcb", "firstIndex": 4697614758}
|
||||
{"blockNumber": 8087701, "blockId": "0x0fa8c8d7549cc9a8d308262706fe248efe759f8b63511efb1e7f3926e9af2dcb", "firstIndex": 4697614758},
|
||||
{"blockNumber": 8149130, "blockId": "0x655ea638fd9e35cc25f4332f260d7bf98f4f6fa9a72e1bff861209f18659e94c", "firstIndex": 4764727744},
|
||||
{"blockNumber": 8208672, "blockId": "0xb5847a670dc3b6181f9e2e40e4218548048366d237a0d12e938b9879bc8cf800", "firstIndex": 4831837882},
|
||||
{"blockNumber": 8271345, "blockId": "0x96797214946f29093883b877ccb0f2a9f771a9a3db3794a642b5dcb781c4d194", "firstIndex": 4898942160},
|
||||
{"blockNumber": 8302858, "blockId": "0x6a5977b3382ca69a9e0412333f97b911c1f69f857d8f31dd0fc930980e24f2fc", "firstIndex": 4966054626},
|
||||
{"blockNumber": 8333618, "blockId": "0x2547294aa23b67c42adbdddfcf424b17a95c4ff0f352a6a2442c529cfb0c892a", "firstIndex": 5033163605},
|
||||
{"blockNumber": 8360582, "blockId": "0xf34f5dceb0ef22e0f782b56c12790472acc675997b9c45075bd4e18a9dacd03c", "firstIndex": 5100273631},
|
||||
{"blockNumber": 8387230, "blockId": "0x0fbea42e87620b5beeb76b67febc173847c54333d7dce9fa2f8f2a3fa9c8c22a", "firstIndex": 5167381673},
|
||||
{"blockNumber": 8414795, "blockId": "0x6c9c000cf5e35da3a7e9e1cd56147c8ce9b43a76d6de945675efd9dc03b628c9", "firstIndex": 5234477010},
|
||||
{"blockNumber": 8444749, "blockId": "0xba85f8c9abaddc34e2113eb49385667ba4b008168ae701f46aa7a7ce78c633a1", "firstIndex": 5301598562},
|
||||
{"blockNumber": 8474551, "blockId": "0x720866a40242f087dd25b6f0dd79224884f435b114a39e60c5669f5c942c78c1", "firstIndex": 5368707262},
|
||||
{"blockNumber": 8501310, "blockId": "0x2b6da233532c701202fb5ac67e005f7d3eb71f88a9fac10c25d24dd11ada05e5", "firstIndex": 5435803858},
|
||||
{"blockNumber": 8526970, "blockId": "0x005f9bbad0a10234129d09894d7fcf04bf1398d326510eedb4195808c282802d", "firstIndex": 5502926509},
|
||||
{"blockNumber": 8550412, "blockId": "0x37c9f3efc9f33cf62f590087c8c9ac70011883f75e648647a6fd0fec00ca627c", "firstIndex": 5570034950},
|
||||
{"blockNumber": 8573540, "blockId": "0x81cfb46a07be7c70bb8a0f76b03a4cd502f92032bea68ad7ba10e26351673000", "firstIndex": 5637137662},
|
||||
{"blockNumber": 8590416, "blockId": "0x5c223d58ef22d7b0dd8c498e8498da4787b5dc706681c2bc83849441f5d0922d", "firstIndex": 5704252906},
|
||||
{"blockNumber": 8616793, "blockId": "0x9043ce02742fb5ec43a696602867b7ce6003a95b36cd28a37eeb9785a46ad49f", "firstIndex": 5771357264},
|
||||
{"blockNumber": 8647290, "blockId": "0xd90115193764b0a33f3f2a719381b3ddbce2532607c72fb287a864eb391eeada", "firstIndex": 5838466144},
|
||||
{"blockNumber": 8673192, "blockId": "0x9bc92d340cccaf4c8c03372efc24eb92c5159106729de8d2e9e064f5568d082b", "firstIndex": 5905577457},
|
||||
{"blockNumber": 8700694, "blockId": "0xb3d656a173b962bc6825198e94a4974289db06a8998060bd0f5ee2044a7a7deb", "firstIndex": 5972679345},
|
||||
{"blockNumber": 8724533, "blockId": "0x253ffc6d77b88fe18736e4c313e9930341c444bc87b2ee22b26cfe8d9d0b178d", "firstIndex": 6039795829},
|
||||
{"blockNumber": 8743948, "blockId": "0x04eb66d0261705d31e629193148d0685058d7759ba5f95d2d38e412dbadb8256", "firstIndex": 6106901747},
|
||||
{"blockNumber": 8758378, "blockId": "0x64adf54e662d11db716610157da672c3d8b45f001dbce40a269871b86a84d026", "firstIndex": 6174011544},
|
||||
{"blockNumber": 8777722, "blockId": "0x0a7f9a956024b404c915e70b42221aa027b2dd715b0697f099dccefae0b9af97", "firstIndex": 6241124215},
|
||||
{"blockNumber": 8800154, "blockId": "0x411f90dc18f2bca31fa63615c2866c907bbac1fae8c06782cabfaf788efba665", "firstIndex": 6308233216},
|
||||
{"blockNumber": 8829725, "blockId": "0x5686f3a5eec1b070d0113c588f8f4a560d57ad96b8045cedb5c08bbadaa0273e", "firstIndex": 6375340033},
|
||||
{"blockNumber": 8858036, "blockId": "0x4f9b5d9fac9c6f6e2224f613cda12e8ab95d636774ce87489dce8a9f805ee2e5", "firstIndex": 6442450330},
|
||||
{"blockNumber": 8884811, "blockId": "0x9cf74f978872683802c065e72b5a5326fdad95f19733c34d927b575cd85fd0bd", "firstIndex": 6509559380}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import (
|
|||
"sort"
|
||||
|
||||
"github.com/ethereum/go-ethereum/rlp/internal/rlpstruct"
|
||||
"golang.org/x/tools/go/packages"
|
||||
)
|
||||
|
||||
// buildContext keeps the data needed for make*Op.
|
||||
|
|
@ -96,14 +97,20 @@ func (bctx *buildContext) typeToStructType(typ types.Type) *rlpstruct.Type {
|
|||
// file and assigns unique names of temporary variables.
|
||||
type genContext struct {
|
||||
inPackage *types.Package
|
||||
imports map[string]struct{}
|
||||
imports map[string]genImportPackage
|
||||
tempCounter int
|
||||
}
|
||||
|
||||
type genImportPackage struct {
|
||||
alias string
|
||||
pkg *types.Package
|
||||
}
|
||||
|
||||
func newGenContext(inPackage *types.Package) *genContext {
|
||||
return &genContext{
|
||||
inPackage: inPackage,
|
||||
imports: make(map[string]struct{}),
|
||||
imports: make(map[string]genImportPackage),
|
||||
tempCounter: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -117,32 +124,78 @@ func (ctx *genContext) resetTemp() {
|
|||
ctx.tempCounter = 0
|
||||
}
|
||||
|
||||
func (ctx *genContext) addImport(path string) {
|
||||
if path == ctx.inPackage.Path() {
|
||||
return // avoid importing the package that we're generating in.
|
||||
func (ctx *genContext) addImportPath(path string) {
|
||||
pkg, err := ctx.loadPackage(path)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("can't load package %q: %v", path, err))
|
||||
}
|
||||
// TODO: renaming?
|
||||
ctx.imports[path] = struct{}{}
|
||||
ctx.addImport(pkg)
|
||||
}
|
||||
|
||||
// importsList returns all packages that need to be imported.
|
||||
func (ctx *genContext) importsList() []string {
|
||||
imp := make([]string, 0, len(ctx.imports))
|
||||
for k := range ctx.imports {
|
||||
imp = append(imp, k)
|
||||
func (ctx *genContext) addImport(pkg *types.Package) string {
|
||||
if pkg.Path() == ctx.inPackage.Path() {
|
||||
return "" // avoid importing the package that we're generating in
|
||||
}
|
||||
sort.Strings(imp)
|
||||
return imp
|
||||
if p, exists := ctx.imports[pkg.Path()]; exists {
|
||||
return p.alias
|
||||
}
|
||||
var (
|
||||
baseName = pkg.Name()
|
||||
alias = baseName
|
||||
counter = 1
|
||||
)
|
||||
// If the base name conflicts with an existing import, add a numeric suffix.
|
||||
for ctx.hasAlias(alias) {
|
||||
alias = fmt.Sprintf("%s%d", baseName, counter)
|
||||
counter++
|
||||
}
|
||||
ctx.imports[pkg.Path()] = genImportPackage{alias, pkg}
|
||||
return alias
|
||||
}
|
||||
|
||||
// qualify is the types.Qualifier used for printing types.
|
||||
// hasAlias checks if an alias is already in use
|
||||
func (ctx *genContext) hasAlias(alias string) bool {
|
||||
for _, p := range ctx.imports {
|
||||
if p.alias == alias {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// loadPackage attempts to load package information
|
||||
func (ctx *genContext) loadPackage(path string) (*types.Package, error) {
|
||||
cfg := &packages.Config{Mode: packages.NeedName}
|
||||
pkgs, err := packages.Load(cfg, path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(pkgs) == 0 {
|
||||
return nil, fmt.Errorf("no package found for path %s", path)
|
||||
}
|
||||
return types.NewPackage(path, pkgs[0].Name), nil
|
||||
}
|
||||
|
||||
// qualify is the types.Qualifier used for printing types
|
||||
func (ctx *genContext) qualify(pkg *types.Package) string {
|
||||
if pkg.Path() == ctx.inPackage.Path() {
|
||||
return ""
|
||||
}
|
||||
ctx.addImport(pkg.Path())
|
||||
// TODO: renaming?
|
||||
return pkg.Name()
|
||||
return ctx.addImport(pkg)
|
||||
}
|
||||
|
||||
// importsList returns all packages that need to be imported
|
||||
func (ctx *genContext) importsList() []string {
|
||||
imp := make([]string, 0, len(ctx.imports))
|
||||
for path, p := range ctx.imports {
|
||||
if p.alias == p.pkg.Name() {
|
||||
imp = append(imp, fmt.Sprintf("%q", path))
|
||||
} else {
|
||||
imp = append(imp, fmt.Sprintf("%s %q", p.alias, path))
|
||||
}
|
||||
}
|
||||
sort.Strings(imp)
|
||||
return imp
|
||||
}
|
||||
|
||||
type op interface {
|
||||
|
|
@ -359,7 +412,7 @@ func (op uint256Op) genWrite(ctx *genContext, v string) string {
|
|||
}
|
||||
|
||||
func (op uint256Op) genDecode(ctx *genContext) (string, string) {
|
||||
ctx.addImport("github.com/holiman/uint256")
|
||||
ctx.addImportPath("github.com/holiman/uint256")
|
||||
|
||||
var b bytes.Buffer
|
||||
resultV := ctx.temp()
|
||||
|
|
@ -732,7 +785,7 @@ func (bctx *buildContext) makeOp(name *types.Named, typ types.Type, tags rlpstru
|
|||
// generateDecoder generates the DecodeRLP method on 'typ'.
|
||||
func generateDecoder(ctx *genContext, typ string, op op) []byte {
|
||||
ctx.resetTemp()
|
||||
ctx.addImport(pathOfPackageRLP)
|
||||
ctx.addImportPath(pathOfPackageRLP)
|
||||
|
||||
result, code := op.genDecode(ctx)
|
||||
var b bytes.Buffer
|
||||
|
|
@ -747,8 +800,8 @@ func generateDecoder(ctx *genContext, typ string, op op) []byte {
|
|||
// generateEncoder generates the EncodeRLP method on 'typ'.
|
||||
func generateEncoder(ctx *genContext, typ string, op op) []byte {
|
||||
ctx.resetTemp()
|
||||
ctx.addImport("io")
|
||||
ctx.addImport(pathOfPackageRLP)
|
||||
ctx.addImportPath("io")
|
||||
ctx.addImportPath(pathOfPackageRLP)
|
||||
|
||||
var b bytes.Buffer
|
||||
fmt.Fprintf(&b, "func (obj *%s) EncodeRLP(_w io.Writer) error {\n", typ)
|
||||
|
|
@ -783,7 +836,7 @@ func (bctx *buildContext) generate(typ *types.Named, encoder, decoder bool) ([]b
|
|||
var b bytes.Buffer
|
||||
fmt.Fprintf(&b, "package %s\n\n", pkg.Name())
|
||||
for _, imp := range ctx.importsList() {
|
||||
fmt.Fprintf(&b, "import %q\n", imp)
|
||||
fmt.Fprintf(&b, "import %s\n", imp)
|
||||
}
|
||||
if encoder {
|
||||
fmt.Fprintln(&b)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
var tests = []string{"uints", "nil", "rawvalue", "optional", "bigint", "uint256"}
|
||||
var tests = []string{"uints", "nil", "rawvalue", "optional", "bigint", "uint256", "pkgclash"}
|
||||
|
||||
func TestOutput(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
|
|
|
|||
13
rlp/rlpgen/testdata/pkgclash.in.txt
vendored
Normal file
13
rlp/rlpgen/testdata/pkgclash.in.txt
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// -*- mode: go -*-
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
eth1 "github.com/ethereum/go-ethereum/eth"
|
||||
eth2 "github.com/ethereum/go-ethereum/eth/protocols/eth"
|
||||
)
|
||||
|
||||
type Test struct {
|
||||
A eth1.MinerAPI
|
||||
B eth2.GetReceiptsPacket
|
||||
}
|
||||
82
rlp/rlpgen/testdata/pkgclash.out.txt
vendored
Normal file
82
rlp/rlpgen/testdata/pkgclash.out.txt
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package test
|
||||
|
||||
import "github.com/ethereum/go-ethereum/common"
|
||||
import "github.com/ethereum/go-ethereum/eth"
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
import "io"
|
||||
import eth1 "github.com/ethereum/go-ethereum/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
|
||||
}
|
||||
|
|
@ -19,6 +19,6 @@ package version
|
|||
const (
|
||||
Major = 1 // Major version component of the current release
|
||||
Minor = 16 // Minor version component of the current release
|
||||
Patch = 2 // Patch version component of the current release
|
||||
Patch = 3 // Patch version component of the current release
|
||||
Meta = "unstable" // Version metadata to append to the version string
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue