From 61d70dab75f34e698265b1432d103e0098fca685 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 4 Mar 2021 22:24:40 +0300 Subject: [PATCH] [#25] container: Fix typo Rename `walletToScripHash` to `walletToScriptHash`. Signed-off-by: Pavel Karpy --- container/container_contract.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/container_contract.go b/container/container_contract.go index 122969e..81d7d2b 100644 --- a/container/container_contract.go +++ b/container/container_contract.go @@ -111,7 +111,7 @@ func Put(container []byte, signature interop.Signature, publicKey interop.Public return true } - from := walletToScripHash(ownerID) + from := walletToScriptHash(ownerID) netmapContractAddr := storage.Get(ctx, netmapContractKey).([]byte) balanceContractAddr := storage.Get(ctx, balanceContractKey).([]byte) containerFee := contract.Call(netmapContractAddr, "config", contract.ReadOnly, containerFeeKey).(int) @@ -437,7 +437,7 @@ func getEACL(ctx storage.Context, cid []byte) extendedACL { return extendedACL{val: []byte{}, sig: interop.Signature{}, pub: interop.PublicKey{}} } -func walletToScripHash(wallet []byte) []byte { +func walletToScriptHash(wallet []byte) []byte { return wallet[1 : len(wallet)-4] } @@ -478,7 +478,7 @@ func isSignedByOwnerKey(msg []byte, sig interop.Signature, owner []byte, key int } func isOwnerFromKey(owner []byte, key interop.PublicKey) bool { - ownerSH := walletToScripHash(owner) + ownerSH := walletToScriptHash(owner) keySH := contract.CreateStandardAccount(key) return common.BytesEqual(ownerSH, keySH)