Skip to content

Commit

Permalink
fix local variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
laizy committed Oct 28, 2019
1 parent a17ac3f commit 1f7d97d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/import_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ func importBlocks(ctx *cli.Context) error {
PrintInfoMsg("Start import blocks.")

var readErr error
blockes := make(chan *types.Block, 10)
blocks := make(chan *types.Block, 10)
go func() {
defer close(blockes)
defer close(blocks)
for i := uint32(startBlockHeight); i <= endBlockHeight; i++ {
size, err := serialization.ReadUint32(fReader)
if err != nil {
Expand Down Expand Up @@ -167,11 +167,11 @@ func importBlocks(ctx *cli.Context) error {
readErr = fmt.Errorf("block height:%d deserialize error:%s", i, err)
break
}
blockes <- block
blocks <- block
}
}()

for block := range blockes {
for block := range blocks {
execResult, err := ledger.DefLedger.ExecuteBlock(block)
if err != nil {
return fmt.Errorf("block height:%d ExecuteBlock error:%s", block.Header.Height, err)
Expand Down

0 comments on commit 1f7d97d

Please sign in to comment.