OSDN Git Service

fix return the error (#1246)
authorDerek <shanhu5739@gmail.com>
Mon, 13 Aug 2018 03:06:49 +0000 (11:06 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 13 Aug 2018 03:06:49 +0000 (11:06 +0800)
* fix the coinbase generate bug (#1136)

* fix return the error

blockchain/pseudohsm/image.go

index f4b0679..7a13a72 100644 (file)
@@ -50,7 +50,7 @@ func (h *HSM) Restore(image *KeyImage) error {
                _, fileName := filepath.Split(xKey.ID)
                file := h.keyStore.JoinPath(keyFileName(fileName))
                if err := writeKeyFile(file, rawKey); err != nil {
-                       return nil
+                       return err
                }
        }
        h.cache.maybeReload()