OSDN Git Service

fix restore assetalias
authoroysheng <oysheng@bytom.io>
Wed, 12 Sep 2018 06:46:55 +0000 (14:46 +0800)
committeroysheng <oysheng@bytom.io>
Wed, 12 Sep 2018 06:46:55 +0000 (14:46 +0800)
asset/image.go

index 8124d6b..ab435f9 100644 (file)
@@ -53,7 +53,7 @@ func (reg *Registry) Restore(image *Image) error {
                if asset.Signer.KeyIndex > maxAssetIndex {
                        maxAssetIndex = asset.Signer.KeyIndex
                }
-               storeBatch.Set(aliasKey(*asset.Alias), asset.AssetID.Bytes())
+               storeBatch.Set(aliasKey(*asset.Alias), []byte(asset.AssetID.String()))
                storeBatch.Set(Key(&asset.AssetID), rawAsset)
        }