[#55] policy: Fix typo in ErrNotAuthorized

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-11-28 13:48:44 +03:00
parent edf3c26047
commit 7864fc3c4d
2 changed files with 4 additions and 4 deletions

View file

@ -23,9 +23,9 @@ const (
)
const (
// ErrNotAutorized is returned when the none of the transaction signers
// ErrNotAuthorized is returned when the none of the transaction signers
// belongs to the list of autorized keys.
ErrNotAutorized = "none of the signers is not autorized to change the contract"
ErrNotAuthorized = "none of the signers is authorized to change the contract"
)
// _deploy function sets up initial list of inner ring public keys.
@ -55,7 +55,7 @@ func checkAuthorization(ctx storage.Context) {
return
}
panic(ErrNotAutorized)
panic(ErrNotAuthorized)
}
func SetAdmin(addr interop.Hash160) {

View file

@ -81,7 +81,7 @@ func TestAutorization(t *testing.T) {
c := e.WithSigners(s)
args := []any{policy.Container, "cnr1", "ingress:myrule3", []byte("opaque")}
c.InvokeFail(t, policy.ErrNotAutorized, "addChain", args...)
c.InvokeFail(t, policy.ErrNotAuthorized, "addChain", args...)
e.Invoke(t, stackitem.Null{}, "setAdmin", s.ScriptHash())
e.Invoke(t, stackitem.NewBuffer(s.ScriptHash().BytesBE()), "getAdmin")