-
Notifications
You must be signed in to change notification settings - Fork 67
/
proof_json_test.go
24 lines (22 loc) · 1.2 KB
/
proof_json_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package verkle
import (
"encoding/json"
"testing"
)
func TestJSONDeserialization(t *testing.T) {
str := `{
"stem": "0x97233a822ee74c294ccec8e4e0c65106b374d4423d5d09236d0f6c6647e185",
"suffixDiffs": [
{ "suffix": 0, "currentValue": null, "newValue": null },
{ "suffix": 1, "currentValue": null, "newValue": null },
{ "suffix": 2, "currentValue": null, "newValue": null },
{ "suffix": 3, "currentValue": null, "newValue": null },
{ "suffix": 4, "currentValue": null, "newValue": null }
]
}`
var statediff StemStateDiff
err := json.Unmarshal([]byte(str), &statediff)
if err != nil {
t.Fatal(err)
}
}