From 100f358d61d60d1196e3a68517c25147b45d965b Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Wed, 23 Sep 2020 15:43:35 -0400 Subject: remove requirement that evm inputs/outputs are non-empty list --- plugin/evm/export_tx.go | 2 -- plugin/evm/export_tx_test.go | 8 -------- plugin/evm/import_tx.go | 2 -- 3 files changed, 12 deletions(-) (limited to 'plugin') diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index 5a8494a..037f875 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -56,8 +56,6 @@ func (tx *UnsignedExportTx) Verify( return errWrongChainID case !tx.DestinationChain.Equals(avmID): return errWrongChainID - case len(tx.Ins) == 0: - return errNoExportInputs case len(tx.ExportedOutputs) == 0: return errNoExportOutputs case tx.NetworkID != ctx.NetworkID: diff --git a/plugin/evm/export_tx_test.go b/plugin/evm/export_tx_test.go index b17f719..40670ff 100644 --- a/plugin/evm/export_tx_test.go +++ b/plugin/evm/export_tx_test.go @@ -118,12 +118,4 @@ func TestExportTxVerify(t *testing.T) { if err := exportTx.Verify(testXChainID, ctx, testTxFee, testAvaxAssetID); err == nil { t.Fatal("ExportTx should have failed verification due to no exported outputs") } - - exportTx.syntacticallyVerified = false - exportTx.ExportedOutputs = exportedOuts - 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") - } } diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go index 00e133b..b848e61 100644 --- a/plugin/evm/import_tx.go +++ b/plugin/evm/import_tx.go @@ -64,8 +64,6 @@ func (tx *UnsignedImportTx) Verify( return errWrongChainID case len(tx.ImportedInputs) == 0: return errNoImportInputs - case len(tx.Outs) == 0: - return errNoImportOutputs case tx.NetworkID != ctx.NetworkID: return errWrongNetworkID case !ctx.ChainID.Equals(tx.BlockchainID): -- cgit v1.2.3-70-g09d2