From 108a3d7cbeac9e3c74e47ff0356f8f41174db03d Mon Sep 17 00:00:00 2001 From: Stefan Iliev <46542846+StefanIliev545@users.noreply.github.com> Date: Mon, 20 May 2024 18:25:29 +0300 Subject: [PATCH] Publisher tx lock for bundle (#1925) * Use tx lock. * ooopsie. --------- Co-authored-by: StefanIliev545 --- go/host/l1/publisher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 2d853f66d6..4c56d6761f 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -302,6 +302,10 @@ func (p *Publisher) PublishCrossChainBundle(bundle *common.ExtCrossChainBundle) return fmt.Errorf("unable to init") } + p.logger.Info("Host preparing to send cross chain bundle transaction") + p.sendingLock.Lock() + defer p.sendingLock.Unlock() + nonce, err := p.ethClient.EthClient().PendingNonceAt(context.Background(), p.hostWallet.Address()) if err != nil { p.logger.Error("Unable to get nonce for management contract", log.ErrKey, err)