aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorAaron Buchwald <[email protected]>2020-09-23 15:41:05 -0400
committerAaron Buchwald <[email protected]>2020-09-23 15:41:05 -0400
commitaffb9c79b05ce6610c4b397fc6998df23cf599bd (patch)
treee771dbf593208d573d7d6c4516d3c29000369f7c /plugin
parentfebbf65d34101980d159a1f47b65848183082db8 (diff)
remove requirement for evm inputs and outputs to be sorted and unique
Diffstat (limited to 'plugin')
-rw-r--r--plugin/evm/export_tx.go3
-rw-r--r--plugin/evm/export_tx_test.go15
-rw-r--r--plugin/evm/import_tx.go3
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 {