(t *testing.T)
| 699 | } |
| 700 | |
| 701 | func TestClient_Update(t *testing.T) { |
| 702 | c, err := light.NewClient( |
| 703 | ctx, |
| 704 | chainID, |
| 705 | trustOptions, |
| 706 | fullNode, |
| 707 | []provider.Provider{fullNode}, |
| 708 | dbs.New(dbm.NewMemDB(), chainID), |
| 709 | light.Logger(log.TestingLogger()), |
| 710 | ) |
| 711 | require.NoError(t, err) |
| 712 | |
| 713 | // should result in downloading & verifying header #3 |
| 714 | l, err := c.Update(ctx, bTime.Add(2*time.Hour)) |
| 715 | assert.NoError(t, err) |
| 716 | if assert.NotNil(t, l) { |
| 717 | assert.EqualValues(t, 3, l.Height) |
| 718 | assert.NoError(t, l.ValidateBasic(chainID)) |
| 719 | } |
| 720 | } |
| 721 | |
| 722 | func TestClient_Concurrency(t *testing.T) { |
| 723 | c, err := light.NewClient( |
nothing calls this directly
no test coverage detected