Skip to content

Commit

Permalink
extra debug logs and get chainB nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lam committed Aug 31, 2023
1 parent a84cb32 commit 3994285
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ var _ = ginkgo.Describe("[Relayer]", ginkgo.Ordered, func() {
hostB, portB, err := getURIHostAndPort(subnetBDetails.ValidatorURIs[0])
gomega.Expect(err).Should(gomega.BeNil())

log.Info("Setting up relayer config", "hostA", hostA, "portA", portA, "blockChainA", blockchainIDA, "hostB", hostB, "portB", portB, "blockChainB", blockchainIDB)

relayerConfig := config.Config{
LogLevel: logging.Info.LowerString(),
NetworkID: 1337,
Expand Down Expand Up @@ -301,12 +303,17 @@ var _ = ginkgo.Describe("[Relayer]", ginkgo.Ordered, func() {
startingNonce, err := chainAWSClient.NonceAt(ctx, fundedAddress, nil)
gomega.Expect(err).Should(gomega.BeNil())

nonce, err := chainBWSClient.NonceAt(ctx, fundedAddress, nil)
gomega.Expect(err).Should(gomega.BeNil())

log.Info("Packing teleporter message", "nonceA", startingNonce, "nonceB", nonce)

payload, err = teleporter.PackTeleporterMessage(common.Hash(blockchainIDB), teleporterMessage)
gomega.Expect(err).Should(gomega.BeNil())

packedInput, err := warp.PackSendWarpMessage(warp.SendWarpMessageInput{
DestinationChainID: common.Hash(blockchainIDB),
DestinationAddress: fundedAddress,
DestinationAddress: teleporterContractAddress,
Payload: payload,
})
gomega.Expect(err).Should(gomega.BeNil())
Expand Down
3 changes: 3 additions & 0 deletions vms/evm/destination_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func NewDestinationClient(logger logging.Logger, subnetInfo config.DestinationSu
if err != nil {
logger.Error(
"Failed to get nonce",
zap.String("eoa", eoa.String()),
zap.String("chainID", destinationID.String()),
zap.String("rpcEndpoint", subnetInfo.GetNodeRPCEndpoint()),
zap.Error(err),
)
return nil, err
Expand Down

0 comments on commit 3994285

Please sign in to comment.