@@ -27,20 +27,20 @@ suite "History Content Keys":
27
27
28
28
# Output
29
29
const contentIds = [
30
- " 0001000000000000000000000000000000000000000000000000000000000009 " ,
31
- " 03e8000000000000000000000000000000000000000000000000000000000009 " ,
32
- " 614e3d0000000000000000000000000000000000000000000000000000000009 " ,
33
- " ffffffffffffffff000000000000000000000000000000000000000000000009 " ,
34
- " fffeffffffffffff000000000000000000000000000000000000000000000009 " ,
35
- " fffffffffffffffe000000000000000000000000000000000000000000000009 " ,
36
- " 0000000000000008000000000000000000000000000000000000000000000009 " ,
37
- " 5555aaaaaaaaaaaa000000000000000000000000000000000000000000000009 " ,
38
- " aaaa555555555555000000000000000000000000000000000000000000000009 " ,
39
- " a0a0050505050505000000000000000000000000000000000000000000000009 " ,
30
+ " 0001000000000000000000000000000000000000000000000000000000000001 " ,
31
+ " 03e8000000000000000000000000000000000000000000000000000000000001 " ,
32
+ " 614e3d0000000000000000000000000000000000000000000000000000000001 " ,
33
+ " ffffffffffffffff000000000000000000000000000000000000000000000001 " ,
34
+ " fffeffffffffffff000000000000000000000000000000000000000000000001 " ,
35
+ " fffffffffffffffe000000000000000000000000000000000000000000000001 " ,
36
+ " 0000000000000008000000000000000000000000000000000000000000000001 " ,
37
+ " 5555aaaaaaaaaaaa000000000000000000000000000000000000000000000001 " ,
38
+ " aaaa555555555555000000000000000000000000000000000000000000000001 " ,
39
+ " a0a0050505050505000000000000000000000000000000000000000000000001 " ,
40
40
]
41
41
42
42
for i in 0 ..< blockNumbers.len():
43
- let contentId = toContentId(blockNumbers[i], ContentType.blockBody )
43
+ let contentId = toContentId(blockNumbers[i], ContentType.receipts )
44
44
45
45
check contentIds[i] == contentId.dumpHex()
46
46
@@ -50,12 +50,12 @@ suite "History Content Keys":
50
50
51
51
# Output
52
52
const
53
- contentKeyHex = " 0x094e61bc0000000000 "
53
+ contentKeyHex = " 0x004e61bc0000000000 "
54
54
contentId =
55
- " 44012581390156707874310974263613699127815223388818970640389075388176810377225 "
55
+ " 44012581390156707874310974263613699127815223388818970640389075388176810377216 "
56
56
# or
57
57
contentIdHexBE =
58
- " 614e3d0000000000000000000000000000000000000000000000000000000009 "
58
+ " 614e3d0000000000000000000000000000000000000000000000000000000000 "
59
59
60
60
let contentKey = blockBodyContentKey(blockNumber)
61
61
@@ -79,12 +79,12 @@ suite "History Content Keys":
79
79
80
80
# Output
81
81
const
82
- contentKeyHex = " 0x0a4e61bc0000000000 "
82
+ contentKeyHex = " 0x014e61bc0000000000 "
83
83
contentId =
84
- " 44012581390156707874310974263613699127815223388818970640389075388176810377226 "
84
+ " 44012581390156707874310974263613699127815223388818970640389075388176810377217 "
85
85
# or
86
86
contentIdHexBE =
87
- " 614e3d000000000000000000000000000000000000000000000000000000000a "
87
+ " 614e3d0000000000000000000000000000000000000000000000000000000001 "
88
88
89
89
let contentKey = receiptsContentKey(blockNumber)
90
90
@@ -102,20 +102,8 @@ suite "History Content Keys":
102
102
# In stint this does BE hex string
103
103
toContentId(contentKey).toHex() == contentIdHexBE
104
104
105
- test " Invalid prefix - 0 value" :
106
- let encoded = ContentKeyByteList.init(@ [byte 0x 00 ])
107
- let decoded = decode(encoded)
108
-
109
- check decoded.isErr()
110
-
111
- test " Invalid prefix - before valid range" :
112
- let encoded = ContentKeyByteList.init(@ [byte 0x 08 ])
113
- let decoded = decode(encoded)
114
-
115
- check decoded.isErr()
116
-
117
105
test " Invalid prefix - after valid range" :
118
- let encoded = ContentKeyByteList.init(@ [byte 0x 0B ])
106
+ let encoded = ContentKeyByteList.init(@ [byte 0x 02 ])
119
107
let decoded = decode(encoded)
120
108
121
109
check decoded.isErr()
0 commit comments