OSDN Git Service

fix build failure (#484)
authorYongfeng LI <wliyongfeng@gmail.com>
Mon, 26 Mar 2018 07:45:55 +0000 (15:45 +0800)
committerGitHub <noreply@github.com>
Mon, 26 Mar 2018 07:45:55 +0000 (15:45 +0800)
protocol/block.go

index 5260575..68e3776 100755 (executable)
@@ -151,7 +151,8 @@ func (c *Chain) SaveBlock(block *types.Block) error {
                return err
        }
 
-       log.WithFields(log.Fields{"height": block.Height, "hash": block.Hash().String()}).Info("Block saved on disk")
+       blockHash := block.Hash()
+       log.WithFields(log.Fields{"height": block.Height, "hash": blockHash.String()}).Info("Block saved on disk")
        return nil
 }