mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
native: cache committee script hash
This commit is contained in:
parent
ca1b8a7df0
commit
5b205ffa7d
2 changed files with 19 additions and 18 deletions
|
@ -128,9 +128,7 @@ func TestNEO_SetGasPerBlock(t *testing.T) {
|
|||
ic := bc.newInteropContext(trigger.System, bc.dao, nil, tx)
|
||||
ic.VM = vm.New()
|
||||
|
||||
h, err := neo.GetCommitteeAddress(bc, bc.dao)
|
||||
require.NoError(t, err)
|
||||
|
||||
h := neo.GetCommitteeAddress()
|
||||
t.Run("Default", func(t *testing.T) {
|
||||
g, err := neo.GetGASPerBlock(ic, 0)
|
||||
require.NoError(t, err)
|
||||
|
@ -189,9 +187,7 @@ func TestNEO_CalculateBonus(t *testing.T) {
|
|||
require.EqualValues(t, 0, res.Int64())
|
||||
})
|
||||
t.Run("ManyBlocks", func(t *testing.T) {
|
||||
h, err := neo.GetCommitteeAddress(bc, bc.dao)
|
||||
require.NoError(t, err)
|
||||
setSigner(tx, h)
|
||||
setSigner(tx, neo.GetCommitteeAddress())
|
||||
ok, err := neo.SetGASPerBlock(ic, 10, big.NewInt(1*native.GASFactor))
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue