Skip to content

Commit

Permalink
Publisher tx lock for bundle (#1925)
Browse files Browse the repository at this point in the history
* Use tx lock.

* ooopsie.

---------

Co-authored-by: StefanIliev545 <[email protected]>
  • Loading branch information
StefanIliev545 and StefanIliev545 authored May 20, 2024
1 parent 9ccab35 commit 108a3d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/host/l1/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 108a3d7

Please sign in to comment.