mirror of
https://github.com/arnaucube/go-dvote.git
synced 2026-02-28 05:26:46 +01:00
census-service: remove \u0000 character from dump
Signed-off-by: p4u <p4u@dabax.net>
This commit is contained in:
@@ -118,6 +118,7 @@ func (t *Tree) Dump() ([]string, error) {
|
||||
err := t.Tree.Walk(nil, func(n *merkletree.Node) {
|
||||
if n.Type == merkletree.NodeTypeLeaf {
|
||||
data := bytes.Trim(n.Value()[65:], "\x00")
|
||||
data = bytes.Replace(data, []byte("\u0000"), nil, -1)
|
||||
response = append(response, fmt.Sprintf("%s", data))
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user