Skip to content

Commit

Permalink
fix(ledger): fix panic when checking last log (#470)
Browse files Browse the repository at this point in the history
fix(ledger): fix panic when checking last log id
  • Loading branch information
paul-nicolas committed Oct 26, 2023
1 parent 93ed88f commit fcdd62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/sqlstorage/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func (s *Store) UpdateTransactionMetadata(ctx context.Context, id uint64, metada
return errors.Wrap(err, "reading last log")
}

if !s.multipleInstance && s.lastTx.ID == id {
if !s.multipleInstance && s.lastTx != nil && s.lastTx.ID == id {
if s.lastTx.Metadata == nil {
s.lastTx.Metadata = metadata
} else {
Expand Down

0 comments on commit fcdd62d

Please sign in to comment.