aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm_test.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/vm_test.go
parentc613e21ea107e8369926f4b53b7830a9d5dabf18 (diff)
parent419cd2d882b93bd98f54957a15c25716fca09123 (diff)
Merge pull request #51 from ava-labs/devv0.3.14
Dev
Diffstat (limited to 'plugin/evm/vm_test.go')
-rw-r--r--plugin/evm/vm_test.go24
1 files changed, 11 insertions, 13 deletions
diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go
index 8ce7825..020b663 100644
--- a/plugin/evm/vm_test.go
+++ b/plugin/evm/vm_test.go
@@ -23,18 +23,16 @@ import (
var (
testNetworkID uint32 = 10
- testCChainID = ids.NewID([32]byte{'c', 'c', 'h', 'a', 'i', 'n', 't', 'e', 's', 't'})
- testXChainID = ids.NewID([32]byte{'t', 'e', 's', 't', 'x'})
- nonExistentID = ids.NewID([32]byte{'F'})
+ testCChainID = ids.ID{'c', 'c', 'h', 'a', 'i', 'n', 't', 'e', 's', 't'}
+ testXChainID = ids.ID{'t', 'e', 's', 't', 'x'}
+ nonExistentID = ids.ID{'F'}
testTxFee = uint64(1000)
- startBalance = uint64(50000)
testKeys []*crypto.PrivateKeySECP256K1R
testEthAddrs []common.Address // testEthAddrs[i] corresponds to testKeys[i]
testShortIDAddrs []ids.ShortID
- testAvaxAssetID = ids.NewID([32]byte{1, 2, 3})
- username = "Johns"
- password = "CjasdjhiPeirbSenfeI13" // #nosec G101
- ethChainID uint32 = 43112
+ testAvaxAssetID = ids.ID{1, 2, 3}
+ username = "Johns"
+ password = "CjasdjhiPeirbSenfeI13" // #nosec G101
)
func init() {
@@ -63,7 +61,7 @@ func BuildGenesisTest(t *testing.T) []byte {
genesis := &core.Genesis{}
if err := json.Unmarshal([]byte(genesisJSON), genesis); err != nil {
- t.Fatalf("Problem unmarshaling genesis JSON: %w", err)
+ t.Fatalf("Problem unmarshaling genesis JSON: %s", err)
}
genesisReply, err := ss.BuildGenesis(nil, genesis)
if err != nil {
@@ -79,10 +77,10 @@ func NewContext() *snow.Context {
ctx.AVAXAssetID = testAvaxAssetID
ctx.XChainID = ids.Empty.Prefix(0)
aliaser := ctx.BCLookup.(*ids.Aliaser)
- aliaser.Alias(testCChainID, "C")
- aliaser.Alias(testCChainID, testCChainID.String())
- aliaser.Alias(testXChainID, "X")
- aliaser.Alias(testXChainID, testXChainID.String())
+ _ = aliaser.Alias(testCChainID, "C")
+ _ = aliaser.Alias(testCChainID, testCChainID.String())
+ _ = aliaser.Alias(testXChainID, "X")
+ _ = aliaser.Alias(testXChainID, testXChainID.String())
// SNLookup might be required here???
return ctx