github
9 of 50 new or added lines in 3 files covered. (18.0%)
2071 existing lines in 64 files now uncovered.11063 of 22721 relevant lines covered (48.69%)
39211.29 hits per line
1 |
package snapshot
|
|
2 |
|
|
3 |
import (
|
|
4 |
"go.vocdoni.io/dvote/statedb"
|
|
5 |
) |
|
6 |
|
|
7 |
// DumpTree dumps a tree to the snapshot.
|
|
UNCOV
8
|
func (s *Snapshot) DumpTree(name, parent string, key []byte, tr statedb.TreeViewer) error { |
× |
UNCOV
9
|
s.lock.Lock() |
× |
UNCOV
10
|
defer s.lock.Unlock()
|
× |
UNCOV
11
|
|
× |
UNCOV
12
|
root, err := tr.Root() |
× |
UNCOV
13
|
if err != nil { |
× |
14 |
return err
|
× |
15 |
} |
× |
16 |
|
|
UNCOV
17
|
s.header.Blobs = append(s.header.Blobs, SnapshotBlobHeader{
|
× |
UNCOV
18
|
Type: snapshotBlobType_Tree, |
× |
UNCOV
19
|
Name: name, |
× |
UNCOV
20
|
Parent: parent, |
× |
UNCOV
21
|
Key: key, |
× |
UNCOV
22
|
Root: root, |
× |
UNCOV
23
|
Size: 0,
|
× |
UNCOV
24
|
}) |
× |
UNCOV
25
|
|
× |
UNCOV
26
|
return tr.Dump(s)
|
× |
27 |
} |