Merge pull request #2641 from cosmos/dev/fix_sim_prints

fix block offsets in printing simulation block number
This commit is contained in:
Rigel 2018-10-31 00:05:18 -04:00 committed by GitHub
commit db1f45a3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,7 @@ func logPrinter(testingmode bool, logs []*strings.Builder) func() {
}
for i := 0; i < numLoggers; i++ {
if f != nil {
_, err := f.WriteString(fmt.Sprintf("Begin block %d\n", i))
_, err := f.WriteString(fmt.Sprintf("Begin block %d\n", i+1))
if err != nil {
panic("Failed to write logs to file")
}
@ -155,7 +155,7 @@ func logPrinter(testingmode bool, logs []*strings.Builder) func() {
panic("Failed to write logs to file")
}
} else {
fmt.Printf("Begin block %d\n", i)
fmt.Printf("Begin block %d\n", i+1)
fmt.Println((*logs[i]).String())
}
}