Merge pull request #3406 from nspcc-dev/error-message
native: adjust error message for ExecFeeFactor and StoragePrice
This commit is contained in:
commit
a28e5b24b2
1 changed files with 2 additions and 2 deletions
|
@ -289,7 +289,7 @@ func (p *Policy) GetExecFeeFactorInternal(d *dao.Simple) int64 {
|
||||||
func (p *Policy) setExecFeeFactor(ic *interop.Context, args []stackitem.Item) stackitem.Item {
|
func (p *Policy) setExecFeeFactor(ic *interop.Context, args []stackitem.Item) stackitem.Item {
|
||||||
value := toUint32(args[0])
|
value := toUint32(args[0])
|
||||||
if value <= 0 || maxExecFeeFactor < value {
|
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) {
|
if !p.NEO.checkCommittee(ic) {
|
||||||
panic("invalid committee signature")
|
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 {
|
func (p *Policy) setStoragePrice(ic *interop.Context, args []stackitem.Item) stackitem.Item {
|
||||||
value := toUint32(args[0])
|
value := toUint32(args[0])
|
||||||
if value <= 0 || maxStoragePrice < value {
|
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) {
|
if !p.NEO.checkCommittee(ic) {
|
||||||
panic("invalid committee signature")
|
panic("invalid committee signature")
|
||||||
|
|
Loading…
Reference in a new issue