Skip to content

Commit

Permalink
fix export bug (#1165)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanZiWen authored Mar 6, 2020
1 parent 8375052 commit f08b490
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/export_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ func exportBlocks(ctx *cli.Context) error {
}

//save cross chain msg to file
crossChainMsg, err := utils.GetCrossChainMsg(i)
crossChainMsg, err := utils.GetCrossChainMsg(i - 1)
if err != nil {
return fmt.Errorf("GetCrossChainMsg:%d error:%s", i, err)
}
if crossChainMsg == nil {
if len(crossChainMsg) == 0 {
err = serialization.WriteUint32(fWriter, 0)
if err != nil {
return fmt.Errorf("write block data height:%d len:%d error:%s", i, uint32(len(data)), err)
Expand All @@ -152,6 +152,7 @@ func exportBlocks(ctx *cli.Context) error {
return fmt.Errorf("write block data height:%d error:%s", i, err)
}
}

if sleepTime > 0 {
time.Sleep(sleepTime)
}
Expand Down

0 comments on commit f08b490

Please sign in to comment.