diff options
author | Aaron Buchwald <[email protected]> | 2020-09-23 15:41:05 -0400 |
---|---|---|
committer | Aaron Buchwald <[email protected]> | 2020-09-23 15:41:05 -0400 |
commit | affb9c79b05ce6610c4b397fc6998df23cf599bd (patch) | |
tree | e771dbf593208d573d7d6c4516d3c29000369f7c /plugin | |
parent | febbf65d34101980d159a1f47b65848183082db8 (diff) |
remove requirement for evm inputs and outputs to be sorted and unique
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/evm/export_tx.go | 3 | ||||
-rw-r--r-- | plugin/evm/export_tx_test.go | 15 | ||||
-rw-r--r-- | plugin/evm/import_tx.go | 3 |
3 files changed, 0 insertions, 21 deletions
diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index b76e312..5a8494a 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -71,9 +71,6 @@ func (tx *UnsignedExportTx) Verify( return err } } - if !IsSortedAndUniqueEVMInputs(tx.Ins) { - return errInputsNotSortedAndUnique - } for _, out := range tx.ExportedOutputs { if err := out.Verify(); err != nil { diff --git a/plugin/evm/export_tx_test.go b/plugin/evm/export_tx_test.go index 2af123f..b17f719 100644 --- a/plugin/evm/export_tx_test.go +++ b/plugin/evm/export_tx_test.go @@ -121,24 +121,9 @@ func TestExportTxVerify(t *testing.T) { exportTx.syntacticallyVerified = false exportTx.ExportedOutputs = exportedOuts - inputs := exportTx.Ins exportTx.Ins = nil // Test No Exported Outputs Errors if err := exportTx.Verify(testXChainID, ctx, testTxFee, testAvaxAssetID); err == nil { t.Fatal("ExportTx should have failed verification due to no inputs") } - - exportTx.syntacticallyVerified = false - exportTx.Ins = []EVMInput{inputs[1], inputs[0]} - // Test unsorted EVM Inputs Errors - if err := exportTx.Verify(testXChainID, ctx, testTxFee, testAvaxAssetID); err == nil { - t.Fatal("ExportTx should have failed verification due to unsorted inputs") - } - - exportTx.syntacticallyVerified = false - exportTx.Ins = []EVMInput{inputs[0], inputs[0]} - // Test non-unique EVM Inputs Errors - if err := exportTx.Verify(testXChainID, ctx, testTxFee, testAvaxAssetID); err == nil { - t.Fatal("ExportTx should have failed verification due to non-unique inputs") - } } diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go index 2b8882f..00e133b 100644 --- a/plugin/evm/import_tx.go +++ b/plugin/evm/import_tx.go @@ -77,9 +77,6 @@ func (tx *UnsignedImportTx) Verify( return err } } - if !IsSortedAndUniqueEVMOutputs(tx.Outs) { - return errExportOutputsNotSortedAndUnique - } for _, in := range tx.ImportedInputs { if err := in.Verify(); err != nil { |