Files
verkle/proof_json_test.go
Guillaume BalletandGitHub 791e499692 create proofs with post state (#384)
* create proofs with post state

* rename post trie reconstruction func

* test length of returned post-state values

* quell deepsource warning
2023-09-12 17:35:59 +02:00

25 lines
1.2 KiB
Go

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)
}
}