Skip to content

Commit 020dec8

Browse files
committed
fixup: Respond to josh's feedback
1 parent 665efee commit 020dec8

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

tests/antithesis/avalanchego/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ func main() {
101101
},
102102
}})
103103
if err != nil {
104-
log.Printf("failed to issue initial funding X-chain baseTx: %s", err)
105-
return
104+
log.Fatalf("failed to issue initial funding X-chain baseTx: %s", err)
106105
}
107106
log.Printf("issued initial funding X-chain baseTx %s in %s", baseTx.ID(), time.Since(baseStartTime))
108107

tests/antithesis/init_db.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func InitBootstrapDB(network *tmpnet.Network, avalancheGoPath string, pluginDir
3737
"",
3838
avalancheGoPath,
3939
pluginDir,
40-
0, // nodeCount is 0 because nodes should already be configured for subnets
4140
); err != nil {
4241
return fmt.Errorf("failed to start network: %w", err)
4342
}

tests/antithesis/xsvm/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ func main() {
7777
},
7878
)
7979
if err != nil {
80-
log.Printf("failed to issue initial funding transfer: %s", err)
81-
return
80+
log.Fatalf("failed to issue initial funding transfer: %s", err)
8281
}
8382
log.Printf("issued initial funding transfer %s in %s", transferTxStatus.TxID, time.Since(baseStartTime))
8483

tests/e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
3838
// Run only once in the first ginkgo process
3939

4040
nodes := tmpnet.NewNodesOrPanic(flagVars.NodeCount())
41-
subnets := vms.XSVMSubnets(nodes...)
41+
subnets := vms.XSVMSubnetsOrPanic(nodes...)
4242
return e2e.NewTestEnvironment(
4343
flagVars,
4444
&tmpnet.Network{

tests/e2e/vms/xsvm.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ var (
2727
subnetBName = "xsvm-b"
2828
)
2929

30-
func XSVMSubnets(nodes ...*tmpnet.Node) []*tmpnet.Subnet {
30+
func XSVMSubnetsOrPanic(nodes ...*tmpnet.Node) []*tmpnet.Subnet {
31+
key, err := secp256k1.NewPrivateKey()
32+
if err != nil {
33+
panic(err)
34+
}
3135
return []*tmpnet.Subnet{
32-
subnet.NewXSVMOrPanic(subnetAName, nil /* key, will be generated */, nodes...),
33-
subnet.NewXSVMOrPanic(subnetBName, nil /* key, will be generated */, nodes...),
36+
subnet.NewXSVMOrPanic(subnetAName, key, nodes...),
37+
subnet.NewXSVMOrPanic(subnetBName, key, nodes...),
3438
}
3539
}
3640

tests/fixture/subnet/xsvm.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ func NewXSVMOrPanic(name string, key *secp256k1.PrivateKey, nodes ...*tmpnet.Nod
1818
panic("a subnet must be validated by at least one node")
1919
}
2020

21-
if key == nil {
22-
var err error
23-
key, err = secp256k1.NewPrivateKey()
24-
if err != nil {
25-
panic(err)
26-
}
27-
}
28-
2921
genesisBytes, err := genesis.Codec.Marshal(genesis.CodecVersion, &genesis.Genesis{
3022
Timestamp: time.Now().Unix(),
3123
Allocations: []genesis.Allocation{

0 commit comments

Comments
 (0)