Skip to content
Permalink
Browse files

remove from pending items after deletion

  • Loading branch information...
tubackkhoa committed Jan 17, 2019
1 parent 69c504b commit c5636b227218f079355a10d2187aba1eec5bf93d
Showing with 3 additions and 0 deletions.
  1. +3 −0 OrderBook/orderbook/batchdb.go
@@ -180,6 +180,9 @@ func (db *BatchDatabase) Delete(key []byte, force bool) error {
if _, ok := db.pendingItems[cacheKey]; ok {
// item.Deleted = true
db.db.Delete(key)

// delete from pending Items
delete(db.pendingItems, cacheKey)
// remove cache key as well
db.cacheItems.Remove(cacheKey)
return nil

0 comments on commit c5636b2

Please sign in to comment.
You can’t perform that action at this time.