aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/import_tx_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/evm/import_tx_test.go')
-rw-r--r--plugin/evm/import_tx_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugin/evm/import_tx_test.go b/plugin/evm/import_tx_test.go
index fcd18ac..52a8fa7 100644
--- a/plugin/evm/import_tx_test.go
+++ b/plugin/evm/import_tx_test.go
@@ -22,7 +22,7 @@ func TestImportTxVerifyNil(t *testing.T) {
func TestImportTxVerify(t *testing.T) {
var importAmount uint64 = 10000000
- txID := ids.NewID([32]byte{0xff})
+ txID := [32]byte{0xff}
importTx := &UnsignedImportTx{
NetworkID: testNetworkID,
BlockchainID: testCChainID,
@@ -134,12 +134,12 @@ func TestImportTxSemanticVerify(t *testing.T) {
importAmount := uint64(1000000)
utxoID := avax.UTXOID{
- TxID: ids.NewID([32]byte{
+ TxID: [32]byte{
0x0f, 0x2f, 0x4f, 0x6f, 0x8e, 0xae, 0xce, 0xee,
0x0d, 0x2d, 0x4d, 0x6d, 0x8c, 0xac, 0xcc, 0xec,
0x0b, 0x2b, 0x4b, 0x6b, 0x8a, 0xaa, 0xca, 0xea,
0x09, 0x29, 0x49, 0x69, 0x88, 0xa8, 0xc8, 0xe8,
- }),
+ },
}
utxo := &avax.UTXO{
@@ -203,9 +203,9 @@ func TestImportTxSemanticVerify(t *testing.T) {
if err := unsignedImportTx.SemanticVerify(vm, tx); err != nil {
t.Fatal("Should have failed to import non-existent UTXO")
}
-
+ inputID := utxo.InputID()
if err := xChainSharedMemory.Put(vm.ctx.ChainID, []*atomic.Element{{
- Key: utxo.InputID().Bytes(),
+ Key: inputID[:],
Value: utxoBytes,
Traits: [][]byte{
testKeys[0].PublicKey().Address().Bytes(),
@@ -293,12 +293,12 @@ func TestNewImportTx(t *testing.T) {
importAmount := uint64(1000000)
utxoID := avax.UTXOID{
- TxID: ids.NewID([32]byte{
+ TxID: [32]byte{
0x0f, 0x2f, 0x4f, 0x6f, 0x8e, 0xae, 0xce, 0xee,
0x0d, 0x2d, 0x4d, 0x6d, 0x8c, 0xac, 0xcc, 0xec,
0x0b, 0x2b, 0x4b, 0x6b, 0x8a, 0xaa, 0xca, 0xea,
0x09, 0x29, 0x49, 0x69, 0x88, 0xa8, 0xc8, 0xe8,
- }),
+ },
}
utxo := &avax.UTXO{
@@ -318,9 +318,9 @@ func TestNewImportTx(t *testing.T) {
}
xChainSharedMemory := sharedMemory.NewSharedMemory(vm.ctx.XChainID)
-
+ inputID := utxo.InputID()
if err := xChainSharedMemory.Put(vm.ctx.ChainID, []*atomic.Element{{
- Key: utxo.InputID().Bytes(),
+ Key: inputID[:],
Value: utxoBytes,
Traits: [][]byte{
testKeys[0].PublicKey().Address().Bytes(),