From fcbfc3b807b637516385b7d3a881d3de9d49376b Mon Sep 17 00:00:00 2001 From: Ekaterina Pavlova Date: Tue, 9 Apr 2024 01:51:03 +0300 Subject: [PATCH] native: adjust error message for ExecFeeFactor and StoragePrice Close #3311 Signed-off-by: Ekaterina Pavlova --- pkg/core/native/policy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/native/policy.go b/pkg/core/native/policy.go index b5ebb8a56..802d63c48 100644 --- a/pkg/core/native/policy.go +++ b/pkg/core/native/policy.go @@ -289,7 +289,7 @@ func (p *Policy) GetExecFeeFactorInternal(d *dao.Simple) int64 { func (p *Policy) setExecFeeFactor(ic *interop.Context, args []stackitem.Item) stackitem.Item { value := toUint32(args[0]) if value <= 0 || maxExecFeeFactor < value { - panic(fmt.Errorf("ExecFeeFactor must be between 0 and %d", maxExecFeeFactor)) + panic(fmt.Errorf("ExecFeeFactor must be between 1 and %d", maxExecFeeFactor)) } if !p.NEO.checkCommittee(ic) { panic("invalid committee signature") @@ -348,7 +348,7 @@ func (p *Policy) GetStoragePriceInternal(d *dao.Simple) int64 { func (p *Policy) setStoragePrice(ic *interop.Context, args []stackitem.Item) stackitem.Item { value := toUint32(args[0]) if value <= 0 || maxStoragePrice < value { - panic(fmt.Errorf("StoragePrice must be between 0 and %d", maxStoragePrice)) + panic(fmt.Errorf("StoragePrice must be between 1 and %d", maxStoragePrice)) } if !p.NEO.checkCommittee(ic) { panic("invalid committee signature")