aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/tx.go
diff options
context:
space:
mode:
authoraaronbuchwald <[email protected]>2020-11-09 16:51:30 -0500
committerGitHub <[email protected]>2020-11-09 16:51:30 -0500
commitae4541f42a666fb5ae1c36d6f7423c3d9eb2c875 (patch)
tree449b53fd8522acc9adb54e93fdc50815f36000d9 /plugin/evm/tx.go
parentc613e21ea107e8369926f4b53b7830a9d5dabf18 (diff)
parent419cd2d882b93bd98f54957a15c25716fca09123 (diff)
Merge pull request #51 from ava-labs/devv0.3.14
Dev
Diffstat (limited to 'plugin/evm/tx.go')
-rw-r--r--plugin/evm/tx.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go
index 7c2ebf1..82d4c10 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")
@@ -117,7 +113,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
@@ -134,7 +130,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 +161,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) }