Skip to content

Commit

Permalink
Merge pull request #320 from ava-labs/nonce-log
Browse files Browse the repository at this point in the history
Log nonce usage
  • Loading branch information
cam-schultz authored Jun 5, 2024
2 parents b3c24b2 + 240255c commit e249166
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ release:
# Default is extracted from the origin remote URL or empty if its private hosted.
github:
owner: ava-labs
name: awm-relayer
name: awm-relayer
# If tag indicates rc, will mark it as prerelease
prerelease: auto
10 changes: 9 additions & 1 deletion vms/evm/destination_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ func NewDestinationClient(
return nil, err
}

logger.Info(
"Initialized destination client",
zap.String("blockchainID", destinationID.String()),
zap.String("evmChainID", evmChainID.String()),
zap.Uint64("nonce", nonce),
)

return &destinationClient{
client: client,
lock: new(sync.Mutex),
Expand Down Expand Up @@ -181,11 +188,12 @@ func (c *destinationClient) SendTx(
)
return err
}
c.currentNonce++
c.logger.Info(
"Sent transaction",
zap.String("txID", signedTx.Hash().String()),
zap.Uint64("nonce", c.currentNonce),
)
c.currentNonce++

return nil
}
Expand Down

0 comments on commit e249166

Please # to comment.