Skip to content

Commit

Permalink
don't retry l2 keystone broadcast in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonNorthey92 committed Mar 4, 2024
1 parent 1b34516 commit 3d40d92
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions e2e/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,29 +212,26 @@ func TestFullNetwork(t *testing.T) {
}
}()

go func() {
for {
l2Keystone.L2BlockNumber++
l2Keystone.L1BlockNumber++

l2KeystoneRequest := bssapi.L2KeystoneRequest{
L2Keystone: l2Keystone,
}
l2KeystoneRequest := bssapi.L2KeystoneRequest{
L2Keystone: l2Keystone,
}

err = bssapi.Write(ctx, bws.conn, "someid", l2KeystoneRequest)
if err != nil {
t.Logf("error: %s", err)
return
}
err = bssapi.Write(ctx, bws.conn, "someid", l2KeystoneRequest)
if err != nil {
t.Logf("error: %s", err)
return
}

// give time for the L2 Keystone to propogate to bitcoin tx mempool
select {
case <-time.After(10 * time.Second):
case <-ctx.Done():
t.Logf(ctx.Err().Error())
return
}
// give time for the L2 Keystone to propogate to bitcoin tx mempool
select {
case <-time.After(10 * time.Second):
case <-ctx.Done():
t.Logf(ctx.Err().Error())
return
}

go func() {
for {
// generate a new btc block, this should include the l2 keystone
err = runBitcoinCommand(ctx,
t,
Expand Down

0 comments on commit 3d40d92

Please sign in to comment.