cmd/stindex: Print more hashes and versions

This commit is contained in:
Jakob Borg
2020-09-04 09:10:33 +02:00
parent 7e738118df
commit b7986801cd
3 changed files with 16 additions and 9 deletions
+8 -1
View File
@@ -116,7 +116,14 @@ func dump(ldb backend.Backend) {
fmt.Printf("[blocklistmap] F:%d H:%x N:%s\n", folder, hash, fileName)
case db.KeyTypeVersion:
fmt.Printf("[version] H:%x\n", key[1:])
fmt.Printf("[version] H:%x", key[1:])
var v protocol.Vector
err := v.Unmarshal(it.Value())
if err != nil {
fmt.Printf(" (invalid)\n")
} else {
fmt.Printf(" V:%v\n", v)
}
default:
fmt.Printf("[??? %d]\n %x\n %x\n", key[0], key, it.Value())