Skip to content

Commit

Permalink
test: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Dec 7, 2024
1 parent 8c5de48 commit ec5cafa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions node/pkg/chain/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ func NewChainHelper(ctx context.Context, opts ...ChainHelperOption) (*ChainHelpe
go nonceManager.StartAutoRefill(ctx)

delegatorUrl := os.Getenv(EnvDelegatorUrl)
if delegatorUrl == "" {
log.Warn().Msg("delegator url not set")
}

return &ChainHelper{
client: primaryClient,
Expand Down Expand Up @@ -193,6 +190,8 @@ func (t *ChainHelper) SubmitDelegatedFallbackDirect(ctx context.Context, contrac
return err
}

log.Debug().Int("nonce", int(nonce)).Msg("nonce")

tx, err := utils.MakeFeeDelegatedTx(ctx, t.client, contractAddress, t.wallet, functionString, t.chainID, nonce, args...)
if err != nil {
return err
Expand Down
4 changes: 1 addition & 3 deletions node/pkg/chain/noncemanagerv2/noncemanagerv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ func (m *NonceManagerV2) GetNonce(ctx context.Context, address string) (uint64,

if _, ok := m.noncePool[address]; !ok {
m.noncePool[address] = make(chan uint64, 30)
if err := m.unsafeRefill(ctx, address); err != nil {
return 0, err
}
}

if len(m.noncePool[address]) < minimumNoncePoolSize {
if err := m.unsafeRefill(ctx, address); err != nil {
return 0, fmt.Errorf("failed to refill nonce pool: %w", err)
Expand Down

0 comments on commit ec5cafa

Please sign in to comment.