diff --git a/e2e/network_test.go b/e2e/network_test.go index a9476d000..0b458fba9 100644 --- a/e2e/network_test.go +++ b/e2e/network_test.go @@ -88,7 +88,7 @@ func TestFullNetwork(t *testing.T) { "-rpcuser=user", "-rpcpassword=password", "generatetoaddress", - "300", // need to generate a lot for greater chance to not spend coinbase + "1000", // need to generate a lot for greater chance to not spend coinbase btcAddress.EncodeAddress(), }) if err != nil { @@ -215,7 +215,7 @@ func TestFullNetwork(t *testing.T) { go func() { // create a new block every second, then view pop payouts and finalities - firstL2Keystone := hemi.L2KeystoneAbbreviate(l2Keystone).Serialize() + keystones := []hemi.L2Keystone{l2Keystone} for { l2KeystoneRequest := bssapi.L2KeystoneRequest{ @@ -251,20 +251,17 @@ func TestFullNetwork(t *testing.T) { time.Sleep(1 * time.Second) - err = bssapi.Write(ctx, bws.conn, "someotherid", bssapi.PopPayoutsRequest{ - L2BlockForPayout: firstL2Keystone[:], - }) - if err != nil { - t.Logf("error: %s", err) - return - } - - err = bssapi.Write(ctx, bws.conn, "someotheridz", bssapi.BTCFinalityByRecentKeystonesRequest{ - NumRecentKeystones: 100, - }) - if err != nil { - t.Logf("error: %s", err) - return + // check each keystone created to see if one made it into the bitcoin + // chain + for _, keystone := range keystones { + ks := hemi.L2KeystoneAbbreviate(keystone).Serialize() + err = bssapi.Write(ctx, bws.conn, "someotherid", bssapi.PopPayoutsRequest{ + L2BlockForPayout: ks[:], + }) + if err != nil { + t.Logf("error: %s", err) + return + } } } }()