Skip to content

Commit

Permalink
Add missing changes to last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 authored and hkalodner committed Jul 22, 2022
1 parent 3bacb2f commit 7e5a6af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/arb-util/broadcastclient/broadcastclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ var logger = arblog.Logger.With().Str("component", "broadcaster").Logger()
func NewBroadcastClient(
websocketUrl string,
chainId uint64,
lastInboxSeqNum *big.Int,
requestedInboxSeqNum *big.Int,
idleTimeout time.Duration,
broadcastClientErrChan chan error,
) *BroadcastClient {
var seqNum *big.Int
if lastInboxSeqNum == nil {
seqNum = big.NewInt(0)
var lastSeqNum *big.Int
if requestedInboxSeqNum == nil || requestedInboxSeqNum.Cmp(big.NewInt(0)) <= 0 {
lastSeqNum = big.NewInt(0)
} else {
seqNum = lastInboxSeqNum
lastSeqNum = new(big.Int).Sub(requestedInboxSeqNum, big.NewInt(1))
}

return &BroadcastClient{
websocketUrl: websocketUrl,
chainId: chainId,
lastInboxSeqNum: seqNum,
lastInboxSeqNum: lastSeqNum,
connMutex: &sync.Mutex{},
errChan: broadcastClientErrChan,
retryMutex: &sync.Mutex{},
Expand Down

0 comments on commit 7e5a6af

Please sign in to comment.