Skip to content

Commit

Permalink
fix lastMatchHeight recover issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Erheng Lu committed Jun 30, 2020
1 parent 55c607a commit c1c3771
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/dex/order/keeper_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import (
bnclog "github.com/binance-chain/node/common/log"
"github.com/binance-chain/node/common/upgrade"
"github.com/binance-chain/node/common/utils"
"github.com/binance-chain/node/plugins/dex/list"
me "github.com/binance-chain/node/plugins/dex/matcheng"
"github.com/binance-chain/node/wire"
dexutils "github.com/binance-chain/node/plugins/dex/utils"
)

type OrderBookSnapshot struct {
Expand Down Expand Up @@ -241,6 +243,10 @@ func (kp *DexKeeper) replayOneBlocks(logger log.Logger, block *tmtypes.Block, st
logger.Error("Failed to replay cancel msg", "err", err)
}
logger.Info("Canceled Order", "order", msg)
case list.ListMiniMsg:
kp.engines[dexutils.Assets2TradingPair(msg.BaseAssetSymbol,msg.QuoteAssetSymbol)].LastMatchHeight = 0
case list.ListMsg:
kp.engines[dexutils.Assets2TradingPair(msg.BaseAssetSymbol,msg.QuoteAssetSymbol)].LastMatchHeight = 0
}
}
}
Expand Down

0 comments on commit c1c3771

Please sign in to comment.