interop: drop deprecated util.FromAddress
It still was used in a number of places, surprisingly.
This commit is contained in:
parent
7306beca4d
commit
4671fbb3be
15 changed files with 42 additions and 113 deletions
|
@ -1,6 +1,7 @@
|
|||
package verify
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/lib/address"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/util"
|
||||
)
|
||||
|
@ -9,6 +10,6 @@ import (
|
|||
// It returns true iff it is signed by Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn (id-0 private key from testchain).
|
||||
func Verify() bool {
|
||||
tx := runtime.GetScriptContainer()
|
||||
addr := util.FromAddress("Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn")
|
||||
addr := address.ToHash160("Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn")
|
||||
return util.Equals(string(tx.Sender), string(addr))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue