diff options
author | Determinant <[email protected]> | 2020-09-20 18:08:03 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-20 18:08:03 -0400 |
commit | 3b2a4156848899197758ddba1481684ebb46eb23 (patch) | |
tree | 9405779b346944bf4b1e6c6911d6bf1079fc1cdd /plugin/evm/import_tx.go | |
parent | c2bdebdce042b3c07888e2066d39b19ad3a9bbc0 (diff) |
make import fee zerov0.3.3-rc.5
Diffstat (limited to 'plugin/evm/import_tx.go')
-rw-r--r-- | plugin/evm/import_tx.go | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go index 381d114..0b0d348 100644 --- a/plugin/evm/import_tx.go +++ b/plugin/evm/import_tx.go @@ -100,7 +100,7 @@ func (tx *UnsignedImportTx) SemanticVerify( // do flow-checking fc := avax.NewFlowChecker() - fc.Produce(vm.ctx.AVAXAssetID, vm.txFee) + //fc.Produce(vm.ctx.AVAXAssetID, vm.txFee) for _, out := range tx.Outs { fc.Produce(out.AssetID, out.Amount) @@ -221,30 +221,30 @@ func (vm *VM) newImportTx( signers = append(signers, utxoSigners) } avax.SortTransferableInputsWithSigners(importedInputs, signers) - importedAVAXAmount := importedAmount[vm.ctx.AVAXAssetID.Key()] - - if importedAVAXAmount == 0 { - return nil, errNoFunds // No imported UTXOs were spendable - } - + //importedAVAXAmount := importedAmount[vm.ctx.AVAXAssetID.Key()] outs := []EVMOutput{} - // AVAX output - if importedAVAXAmount < vm.txFee { // imported amount goes toward paying tx fee - // TODO: spend EVM balance to compensate vm.txFee-importedAmount - return nil, errNoFunds - } else if importedAVAXAmount > vm.txFee { - outs = append(outs, EVMOutput{ - Address: to, - Amount: importedAVAXAmount - vm.txFee, - AssetID: vm.ctx.AVAXAssetID, - }) - } + //if importedAVAXAmount == 0 { + // return nil, errNoFunds // No imported UTXOs were spendable + //} + + //// AVAX output + //if importedAVAXAmount < vm.txFee { // imported amount goes toward paying tx fee + // // TODO: spend EVM balance to compensate vm.txFee-importedAmount + // return nil, errNoFunds + //} else if importedAVAXAmount > vm.txFee { + // outs = append(outs, EVMOutput{ + // Address: to, + // Amount: importedAVAXAmount - vm.txFee, + // AssetID: vm.ctx.AVAXAssetID, + // }) + //} // non-AVAX asset outputs for aidKey, amount := range importedAmount { aid := ids.NewID(aidKey) - if aid.Equals(vm.ctx.AVAXAssetID) || amount == 0 { + //if aid.Equals(vm.ctx.AVAXAssetID) || amount == 0 { + if amount == 0 { continue } outs = append(outs, EVMOutput{ |