mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
gmf
This commit is contained in:
parent
e149581818
commit
f69dbcac01
2 changed files with 4 additions and 4 deletions
|
|
@ -151,7 +151,7 @@ func forEachUnpack(t Type, output []byte, start, size int) (interface{}, error)
|
||||||
// Arrays have packed elements, resulting in longer unpack steps.
|
// Arrays have packed elements, resulting in longer unpack steps.
|
||||||
// Slices have just 32 bytes per element (pointing to the contents).
|
// Slices have just 32 bytes per element (pointing to the contents).
|
||||||
elemSize := 32
|
elemSize := 32
|
||||||
if t.T == ArrayTy || t.T == SliceTy{
|
if t.T == ArrayTy || t.T == SliceTy {
|
||||||
elemSize = getFullElemSize(t.Elem)
|
elemSize = getFullElemSize(t.Elem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ var unpackTests = []unpackTest{
|
||||||
{
|
{
|
||||||
def: `[{"type": "uint8[2][]"}]`,
|
def: `[{"type": "uint8[2][]"}]`,
|
||||||
enc: "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
enc: "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002",
|
||||||
want: [][2]uint8{{1,2}, {1,2}},
|
want: [][2]uint8{{1, 2}, {1, 2}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
def: `[{"type": "uint16[]"}]`,
|
def: `[{"type": "uint16[]"}]`,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue