Skip to content

Commit

Permalink
Network test start height + no panic (hemilabs#22)
Browse files Browse the repository at this point in the history
* start bfg btc height high so we don't take too long to process
* don't panic in go routines if context is done
  • Loading branch information
ClaytonNorthey92 authored Mar 6, 2024
1 parent fbfc2ee commit 86c32fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions e2e/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ func TestFullNetwork(t *testing.T) {
select {
case <-time.After(10 * time.Second):
case <-ctx.Done():
panic(ctx.Err())
t.Log(ctx.Err())
return
}

// generate a new btc block, this should include the l2 keystone
Expand All @@ -258,7 +259,8 @@ func TestFullNetwork(t *testing.T) {
select {
case <-time.After(10 * time.Second):
case <-ctx.Done():
panic(ctx.Err())
t.Log(ctx.Err())
return
}

// ensure the l2 keystone is in the chain
Expand Down Expand Up @@ -383,7 +385,7 @@ func createBfg(ctx context.Context, t *testing.T, pgUri string, electrumxAddr st
req := testcontainers.ContainerRequest{
Env: map[string]string{
"BFG_POSTGRES_URI": pgUri,
"BFG_BTC_START_HEIGHT": "100",
"BFG_BTC_START_HEIGHT": "5000",
"BFG_EXBTC_ADDRESS": electrumxAddr,
"BFG_LOG_LEVEL": "TRACE",
"BFG_PUBLIC_ADDRESS": ":8383",
Expand Down

0 comments on commit 86c32fb

Please sign in to comment.