mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
core: refactore some tests
They have a lot of common code.
This commit is contained in:
parent
17842dabd6
commit
9faa63453c
4 changed files with 20 additions and 94 deletions
|
@ -313,14 +313,7 @@ func TestNEO_TransferOnPayment(t *testing.T) {
|
|||
require.NoError(t, bc.dao.PutContractState(cs))
|
||||
|
||||
const amount = 2
|
||||
tx := newNEP17Transfer(bc.contracts.NEO.Hash, neoOwner, cs.ScriptHash(), amount)
|
||||
tx.SystemFee += 1_000_000
|
||||
tx.NetworkFee = 10_000_000
|
||||
tx.ValidUntilBlock = bc.BlockHeight() + 1
|
||||
addSigners(tx)
|
||||
require.NoError(t, testchain.SignTx(bc, tx))
|
||||
require.NoError(t, bc.AddBlock(bc.newBlock(tx)))
|
||||
|
||||
tx := transferTokenFromMultisigAccount(t, bc, cs.ScriptHash(), bc.contracts.NEO.Hash, amount)
|
||||
aer, err := bc.GetAppExecResults(tx.Hash(), trigger.Application)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, vm.HaltState, aer[0].VMState)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue