@@ -27,31 +27,37 @@ import (
27
27
)
28
28
29
29
var (
30
- BlockNumber = big .NewInt (rand .Int63 ())
31
- BlockHash = "0xfa40fbe2d98d98b3363a778d52f2bcd29d6790b9b3f3cab2b167fd12d3550f73"
32
- CodeHash = common .Hex2Bytes ("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" )
33
- NewNonceValue = rand .Uint64 ()
34
- NewBalanceValue = rand .Int63 ()
35
- ContractRoot = common .HexToHash ("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" )
36
- StoragePath = common .HexToHash ("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" ).Bytes ()
37
- StorageKey = common .HexToHash ("0000000000000000000000000000000000000000000000000000000000000001" ).Bytes ()
38
- SmallStorageValue = common .Hex2Bytes ("03" )
30
+ BlockNumber = big .NewInt (rand .Int63 ())
31
+ BlockHash = "0xfa40fbe2d98d98b3363a778d52f2bcd29d6790b9b3f3cab2b167fd12d3550f73"
32
+ CodeHash = common .Hex2Bytes ("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" )
33
+ NewNonceValue = rand .Uint64 ()
34
+ NewBalanceValue = rand .Int63 ()
35
+ ContractRoot = common .HexToHash ("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" )
36
+ StoragePath = common .HexToHash ("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" ).Bytes ()
37
+ StorageKey = common .HexToHash ("0000000000000000000000000000000000000000000000000000000000000001" ).Bytes ()
38
+ SmallStorageValue = common .Hex2Bytes ("03" )
39
39
SmallStorageValueRlp , _ = rlp .EncodeToBytes (SmallStorageValue )
40
- storageWithSmallValue = []statediff.StorageDiff {{
40
+ storageWithSmallValue = []statediff.StorageDiff {{
41
41
Key : StorageKey ,
42
42
Value : SmallStorageValueRlp ,
43
43
Path : StoragePath ,
44
44
Proof : [][]byte {},
45
45
}}
46
- LargeStorageValue = common .Hex2Bytes ("00191b53778c567b14b50ba0000" )
46
+ LargeStorageValue = common .Hex2Bytes ("00191b53778c567b14b50ba0000" )
47
47
LargeStorageValueRlp , rlpErr = rlp .EncodeToBytes (LargeStorageValue )
48
- storageWithLargeValue = []statediff.StorageDiff {{
48
+ storageWithLargeValue = []statediff.StorageDiff {{
49
49
Key : StorageKey ,
50
50
Value : LargeStorageValueRlp ,
51
51
Path : StoragePath ,
52
52
Proof : [][]byte {},
53
53
}}
54
- EmptyStorage = make ([]statediff.StorageDiff , 0 )
54
+ EmptyStorage = make ([]statediff.StorageDiff , 0 )
55
+ StorageWithBadValue = statediff.StorageDiff {
56
+ Key : StorageKey ,
57
+ Value : []byte {0 , 1 , 2 },
58
+ // this storage value will fail to be decoded as an RLP with the following error message:
59
+ // "input contains more than one value"
60
+ }
55
61
contractAddress = common .HexToAddress ("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476592" )
56
62
ContractLeafKey = crypto .Keccak256Hash (contractAddress [:])
57
63
anotherContractAddress = common .HexToAddress ("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476593" )
0 commit comments