MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / TestClient_Update

Function TestClient_Update

light/client_test.go:701–720  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

699}
700
701func 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
722func TestClient_Concurrency(t *testing.T) {
723 c, err := light.NewClient(

Callers

nothing calls this directly

Calls 6

UpdateMethod · 0.95
NewClientFunction · 0.92
LoggerFunction · 0.92
TestingLoggerFunction · 0.92
ValidateBasicMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected