Skip to content

Commit

Permalink
Merge branch 'main' into discovery-dial-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed May 3, 2023
2 parents cf38663 + 2055f22 commit 77a4299
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nodebuilder/tests/reconstruct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ func TestFullReconstructFromLights(t *testing.T) {
require.NoError(t, err)

os.Setenv(p2p.EnvKeyCelestiaBootstrapper, "true")
cfg.Header.TrustedPeers = []string{
"/ip4/1.2.3.4/tcp/12345/p2p/12D3KooWNaJ1y1Yio3fFJEXCZyd1Cat3jmrPdgkYCrHfKD3Ce21p",
}
bootstrapper := sw.NewNodeWithConfig(node.Full, cfg)
require.NoError(t, bootstrapper.Start(ctx))
require.NoError(t, bridge.Start(ctx))
Expand Down
7 changes: 7 additions & 0 deletions nodebuilder/tests/swamp/swamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func (s *Swamp) NewBridgeNode(options ...fx.Option) *nodebuilder.Node {
// and a mockstore to the NewNodeWithStore method
func (s *Swamp) NewFullNode(options ...fx.Option) *nodebuilder.Node {
cfg := nodebuilder.DefaultConfig(node.Full)
cfg.Header.TrustedPeers = []string{
"/ip4/1.2.3.4/tcp/12345/p2p/12D3KooWNaJ1y1Yio3fFJEXCZyd1Cat3jmrPdgkYCrHfKD3Ce21p",
}
store := nodebuilder.MockStore(s.t, cfg)

return s.NewNodeWithStore(node.Full, store, options...)
Expand All @@ -197,6 +200,10 @@ func (s *Swamp) NewFullNode(options ...fx.Option) *nodebuilder.Node {
// and a mockstore to the NewNodeWithStore method
func (s *Swamp) NewLightNode(options ...fx.Option) *nodebuilder.Node {
cfg := nodebuilder.DefaultConfig(node.Light)
cfg.Header.TrustedPeers = []string{
"/ip4/1.2.3.4/tcp/12345/p2p/12D3KooWNaJ1y1Yio3fFJEXCZyd1Cat3jmrPdgkYCrHfKD3Ce21p",
}

store := nodebuilder.MockStore(s.t, cfg)

return s.NewNodeWithStore(node.Light, store, options...)
Expand Down

0 comments on commit 77a4299

Please sign in to comment.