Skip to content

Commit

Permalink
Fix pebble panic (#192)
Browse files Browse the repository at this point in the history
* Fix pebble panic

* lint
  • Loading branch information
Sneh1999 authored Aug 14, 2024
1 parent 4d547c9 commit ea5c47e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arbnode/transaction_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1017,23 +1017,18 @@ func (s *TransactionStreamer) WriteMessageFromSequencer(
MessageWithMeta: msgWithMeta,
BlockHash: &msgResult.BlockHash,
}
batch := s.db.NewBatch()
if err := s.writeMessages(pos, []arbostypes.MessageWithMetadataAndBlockHash{msgWithBlockHash}, batch); err != nil {
if err := s.writeMessages(pos, []arbostypes.MessageWithMetadataAndBlockHash{msgWithBlockHash}, s.db.NewBatch()); err != nil {
return err
}

s.broadcastMessages([]arbostypes.MessageWithMetadataAndBlockHash{msgWithBlockHash}, pos)
s.espressoTxnsStateInsertionMutex.Lock()
defer s.espressoTxnsStateInsertionMutex.Unlock()
err = s.SubmitEspressoTransactionPos(pos, batch)
err = s.SubmitEspressoTransactionPos(pos, s.db.NewBatch())
if err != nil {
return err
}
err = batch.Write()
if err != nil {
return err

}
return nil
}

Expand Down Expand Up @@ -1412,6 +1407,11 @@ func (s *TransactionStreamer) SubmitEspressoTransactionPos(pos arbutil.MessageIn
return err
}

err = batch.Write()
if err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit ea5c47e

Please sign in to comment.