mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
Merge pull request #1435 from nspcc-dev/checkwitness-calling-script-hash
interop/runtime: allow calling script hash to pass CheckWitness
This commit is contained in:
commit
e4be60c3a8
4 changed files with 12 additions and 1 deletions
|
@ -127,6 +127,7 @@ func TestNEO_SetGasPerBlock(t *testing.T) {
|
|||
tx := transaction.New(netmode.UnitTestNet, []byte{}, 0)
|
||||
ic := bc.newInteropContext(trigger.System, bc.dao, nil, tx)
|
||||
ic.VM = vm.New()
|
||||
ic.VM.LoadScript([]byte{byte(opcode.RET)})
|
||||
|
||||
h := neo.GetCommitteeAddress()
|
||||
t.Run("Default", func(t *testing.T) {
|
||||
|
@ -184,6 +185,8 @@ func TestNEO_CalculateBonus(t *testing.T) {
|
|||
neo := bc.contracts.NEO
|
||||
tx := transaction.New(netmode.UnitTestNet, []byte{}, 0)
|
||||
ic := bc.newInteropContext(trigger.System, bc.dao, nil, tx)
|
||||
ic.SpawnVM()
|
||||
ic.VM.LoadScript([]byte{byte(opcode.RET)})
|
||||
t.Run("Invalid", func(t *testing.T) {
|
||||
_, err := neo.CalculateBonus(ic, new(big.Int).SetInt64(-1), 0, 1)
|
||||
require.Error(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue