From 5b12d3fa21635145cb8a752b56477e22fca77a5b Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Fri, 30 Oct 2020 12:55:53 -0400 Subject: remove these ID calls: Key(), Bytes(), Equals(), NewID(), IsZero() --- plugin/evm/tx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin/evm/tx.go') diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go index 7c2ebf1..3a2f820 100644 --- a/plugin/evm/tx.go +++ b/plugin/evm/tx.go @@ -134,7 +134,7 @@ func (ins *innerSortInputsAndSigners) Less(i, j int) bool { if addrComp != 0 { return addrComp < 0 } - return bytes.Compare(ins.inputs[i].AssetID.Bytes(), ins.inputs[j].AssetID.Bytes()) < 0 + return bytes.Compare(ins.inputs[i].AssetID[:], ins.inputs[j].AssetID[:]) < 0 } func (ins *innerSortInputsAndSigners) Len() int { return len(ins.inputs) } @@ -165,7 +165,7 @@ func (outs *innerSortEVMOutputs) Less(i, j int) bool { if addrComp != 0 { return addrComp < 0 } - return bytes.Compare(outs.outputs[i].AssetID.Bytes(), outs.outputs[j].AssetID.Bytes()) < 0 + return bytes.Compare(outs.outputs[i].AssetID[:], outs.outputs[j].AssetID[:]) < 0 } func (outs *innerSortEVMOutputs) Len() int { return len(outs.outputs) } -- cgit v1.2.3 From 52de74ce47a2614af3b3a32b21aa5309d4b00d78 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Sun, 1 Nov 2020 18:32:22 -0500 Subject: lint --- plugin/evm/tx.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'plugin/evm/tx.go') diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go index 3a2f820..e44eefe 100644 --- a/plugin/evm/tx.go +++ b/plugin/evm/tx.go @@ -23,10 +23,6 @@ import ( "github.com/ethereum/go-ethereum/common" ) -// Max size of memo field -// Don't change without also changing avm.maxMemoSize -const maxMemoSize = 256 - var ( errWrongBlockchainID = errors.New("wrong blockchain ID provided") errWrongNetworkID = errors.New("tx was issued with a different network ID") -- cgit v1.2.3 From 3a887bbc7b7d88070dbcdb1104119bce282ed249 Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Tue, 3 Nov 2020 20:11:42 -0500 Subject: Add getUTXOs and issueTx --- plugin/evm/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugin/evm/tx.go') diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go index 7c2ebf1..2d722a5 100644 --- a/plugin/evm/tx.go +++ b/plugin/evm/tx.go @@ -117,7 +117,7 @@ func (tx *Tx) Sign(c codec.Codec, signers [][]*crypto.PrivateKeySECP256K1R) erro signedBytes, err := c.Marshal(tx) if err != nil { - return fmt.Errorf("couldn't marshal ProposalTx: %w", err) + return fmt.Errorf("couldn't marshal Tx: %w", err) } tx.Initialize(unsignedBytes, signedBytes) return nil -- cgit v1.2.3