File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,17 @@ func PrintState(root *schema.ImmutableState) string {
8282
8383 str := strings.Builder {}
8484
85- str .WriteString (fmt .Sprintf ("database: %s\n " , root .Db ))
86- str .WriteString (fmt .Sprintf ("txID: %d\n " , root .TxId ))
87- str .WriteString (fmt .Sprintf ("hash: %x\n " , root .TxHash ))
85+ if root .PrecommittedTxId == 0 {
86+ str .WriteString (fmt .Sprintf ("database: %s\n " , root .Db ))
87+ str .WriteString (fmt .Sprintf ("txID: %d\n " , root .TxId ))
88+ str .WriteString (fmt .Sprintf ("hash: %x\n " , root .TxHash ))
89+ } else {
90+ str .WriteString (fmt .Sprintf ("database: %s\n " , root .Db ))
91+ str .WriteString (fmt .Sprintf ("txID: %d\n " , root .TxId ))
92+ str .WriteString (fmt .Sprintf ("hash: %x\n " , root .TxHash ))
93+ str .WriteString (fmt .Sprintf ("precommittedTxID: %d\n " , root .PrecommittedTxId ))
94+ str .WriteString (fmt .Sprintf ("precommittedHash: %x\n " , root .PrecommittedTxHash ))
95+ }
8896
8997 return str .String ()
9098}
You can’t perform that action at this time.
0 commit comments