mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 23:55:11 +00:00
native: drop Neo.Native.Deploy, move contract init to management contract
The contract is almost a stub at the moment, though it does deploy other contracts.
This commit is contained in:
parent
090bee8624
commit
ad3547783d
15 changed files with 123 additions and 99 deletions
|
@ -713,11 +713,18 @@ func TestVerifyTx(t *testing.T) {
|
|||
require.True(t, errors.Is(bc.VerifyTx(tx), ErrHasConflicts))
|
||||
})
|
||||
t.Run("attribute on-chain conflict", func(t *testing.T) {
|
||||
b, err := bc.GetBlock(bc.GetHeaderHash(0))
|
||||
require.NoError(t, err)
|
||||
conflictsHash := b.Transactions[0].Hash()
|
||||
tx := getConflictsTx(conflictsHash)
|
||||
require.Error(t, bc.VerifyTx(tx))
|
||||
tx := transaction.New(netmode.UnitTestNet, []byte{byte(opcode.PUSH1)}, 0)
|
||||
tx.ValidUntilBlock = 4242
|
||||
tx.Signers = []transaction.Signer{{
|
||||
Account: testchain.MultisigScriptHash(),
|
||||
Scopes: transaction.None,
|
||||
}}
|
||||
require.NoError(t, testchain.SignTx(bc, tx))
|
||||
b := bc.newBlock(tx)
|
||||
|
||||
require.NoError(t, bc.AddBlock(b))
|
||||
txConflict := getConflictsTx(tx.Hash())
|
||||
require.Error(t, bc.VerifyTx(txConflict))
|
||||
})
|
||||
t.Run("positive", func(t *testing.T) {
|
||||
tx := getConflictsTx(random.Uint256())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue