mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
Partially revert "core: fix native NEO ABI"
This partially reverts commit ca127f1615
.
This commit is contained in:
parent
c6ced9b24a
commit
bc85f00cc7
1 changed files with 2 additions and 2 deletions
|
@ -207,7 +207,7 @@ func (c *ContractMD) AddMethod(md *MethodAndPrice, desc *manifest.Method) {
|
||||||
index := sort.Search(len(c.Manifest.ABI.Methods), func(i int) bool {
|
index := sort.Search(len(c.Manifest.ABI.Methods), func(i int) bool {
|
||||||
md := c.Manifest.ABI.Methods[i]
|
md := c.Manifest.ABI.Methods[i]
|
||||||
if md.Name != desc.Name {
|
if md.Name != desc.Name {
|
||||||
return strings.ToLower(md.Name) >= strings.ToLower(desc.Name)
|
return md.Name >= desc.Name
|
||||||
}
|
}
|
||||||
return len(md.Parameters) > len(desc.Parameters)
|
return len(md.Parameters) > len(desc.Parameters)
|
||||||
})
|
})
|
||||||
|
@ -236,7 +236,7 @@ func (c *ContractMD) GetMethodByOffset(offset int) (MethodAndPrice, bool) {
|
||||||
func (c *ContractMD) GetMethod(name string, paramCount int) (MethodAndPrice, bool) {
|
func (c *ContractMD) GetMethod(name string, paramCount int) (MethodAndPrice, bool) {
|
||||||
index := sort.Search(len(c.Methods), func(i int) bool {
|
index := sort.Search(len(c.Methods), func(i int) bool {
|
||||||
md := c.Methods[i]
|
md := c.Methods[i]
|
||||||
res := strings.Compare(strings.ToLower(name), strings.ToLower(md.MD.Name))
|
res := strings.Compare(name, md.MD.Name)
|
||||||
switch res {
|
switch res {
|
||||||
case -1, 1:
|
case -1, 1:
|
||||||
return res == -1
|
return res == -1
|
||||||
|
|
Loading…
Reference in a new issue