From e22730f208ca5cabcb5f22f24cb7cf2c70bd92e0 Mon Sep 17 00:00:00 2001 From: Shubham Date: Fri, 13 Oct 2023 01:27:06 +0530 Subject: [PATCH] Fix snapshot error at startup (#135) --- plugin/evm/orderbook/memory_database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/evm/orderbook/memory_database.go b/plugin/evm/orderbook/memory_database.go index e05a969e4d..48408bd5b7 100644 --- a/plugin/evm/orderbook/memory_database.go +++ b/plugin/evm/orderbook/memory_database.go @@ -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) }