[#504] morph/client: Add more global config value getters

Including:
- typo fix for `StringFromStackItem` error msg
- EigenTrust alpha getter.
- renaming local var in reading uin64 values
from global cfg function

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-05-05 23:54:08 +03:00 committed by Alex Vanin
parent dddbf0368c
commit 7319ca5a00
3 changed files with 40 additions and 3 deletions

View file

@ -87,7 +87,7 @@ func ArrayFromStackItem(param stackitem.Item) ([]stackitem.Item, error) {
// StringFromStackItem receives string value from the value of a smart contract parameter.
func StringFromStackItem(param stackitem.Item) (string, error) {
if param.Type() != stackitem.ByteArrayT {
return "", errors.Errorf("chain/client: %s is not an integer type", param.Type())
return "", errors.Errorf("chain/client: %s is not an string type", param.Type())
}
return stackitem.ToString(param)