cli: use base64 for state dump

See neo-project/neo-modules/#499.
This commit is contained in:
Roman Khimov 2021-02-07 18:52:44 +03:00
parent 272bb03e3b
commit 7bef87e2ef

View file

@ -1,7 +1,7 @@
package server package server
import ( import (
"encoding/hex" "encoding/base64"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
@ -43,8 +43,8 @@ func batchToMap(index uint32, batch *storage.MemBatch) blockDump {
ops = append(ops, storageOp{ ops = append(ops, storageOp{
State: op, State: op,
Key: hex.EncodeToString(key[1:]), Key: base64.StdEncoding.EncodeToString(key[1:]),
Value: hex.EncodeToString(batch.Put[i].Value), Value: base64.StdEncoding.EncodeToString(batch.Put[i].Value),
}) })
} }
@ -56,7 +56,7 @@ func batchToMap(index uint32, batch *storage.MemBatch) blockDump {
ops = append(ops, storageOp{ ops = append(ops, storageOp{
State: "Deleted", State: "Deleted",
Key: hex.EncodeToString(key[1:]), Key: base64.StdEncoding.EncodeToString(key[1:]),
}) })
} }