Skip to content

Commit

Permalink
chore: add a knuu getter (#3900)
Browse files Browse the repository at this point in the history
While attempting to use testnet pkg in the node repo. There is a need to
use `knuu` object that is initialized by the `testnet.New()` to create
new instances and interact with `knuu`. Since it is not exported, this
PR proposed to have a getter func for it, so users can interact with
knuu easily.
  • Loading branch information
mojtaba-esk authored Sep 25, 2024
1 parent 00805f0 commit e24c0e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/e2e/testnet/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func New(ctx context.Context, name string, seed int64, grafana *GrafanaInfo, cha
}, nil
}

func (t *Testnet) Knuu() *knuu.Knuu {
return t.knuu
}

func (t *Testnet) NewPreloader() (*preloader.Preloader, error) {
if t.knuu == nil {
return nil, errors.New("knuu is not initialized")
Expand Down

0 comments on commit e24c0e8

Please sign in to comment.