Skip to content

Commit

Permalink
Fix snapshot error at startup (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
lumos42 authored Oct 12, 2023
1 parent d3c0e82 commit e22730f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/evm/orderbook/memory_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ func (db *InMemoryDatabase) LoadFromSnapshot(snapshot Snapshot) error {
db.mu.Lock()
defer db.mu.Unlock()

if snapshot.Data == nil || snapshot.Data.Orders == nil || snapshot.Data.LongOrders == nil || snapshot.Data.ShortOrders == nil ||
snapshot.Data.TraderMap == nil || snapshot.Data.LastPrice == nil {
if snapshot.Data == nil || snapshot.Data.Orders == nil || snapshot.Data.TraderMap == nil || snapshot.Data.LastPrice == nil ||
snapshot.Data.CumulativePremiumFraction == nil {
return fmt.Errorf("invalid snapshot; snapshot=%+v", snapshot)
}

Expand Down

0 comments on commit e22730f

Please sign in to comment.