Every time I use the orderbook extension it crashes after running for a couple of hours with the following stack trace:
assert.js:89
throw new assert.AssertionError({
^
AssertionError: Offer total cannot be negative
at OrderBook._subtractOwnerOfferTotal (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:693:7)
at OrderBook._deleteOffer (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:660:16)
at OrderBook._processTransactionNode (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:448:18)
at Array.forEach (native)
at OrderBook._processTransaction (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:426:23)
at OrderBook._onTransaction (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:378:14)
at emitOne (events.js:101:20)
at RestrictedConnection.emit (events.js:188:7)
at RestrictedConnection._onMessage (/home/bot/app/node_modules/ripple-lib/dist/npm/common/connection.js:123:17)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:191:7)
I tried with a variety of different asset pairs but every time I receive the same result. I use the orderbook extension just to receive the events emmited by it. And since this stack trace doesnt involve any of my own code I really think this is flaw in the code of the Orderbook.js.
What would happen if we just delete this assertion line ?
Every time I use the orderbook extension it crashes after running for a couple of hours with the following stack trace:
assert.js:89 throw new assert.AssertionError({ ^ AssertionError: Offer total cannot be negative at OrderBook._subtractOwnerOfferTotal (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:693:7) at OrderBook._deleteOffer (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:660:16) at OrderBook._processTransactionNode (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:448:18) at Array.forEach (native) at OrderBook._processTransaction (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:426:23) at OrderBook._onTransaction (/home/bot/ripple-lib-extensions/orderbook/dist/npm/orderbook.js:378:14) at emitOne (events.js:101:20) at RestrictedConnection.emit (events.js:188:7) at RestrictedConnection._onMessage (/home/bot/app/node_modules/ripple-lib/dist/npm/common/connection.js:123:17) at emitTwo (events.js:106:13) at WebSocket.emit (events.js:191:7)
I tried with a variety of different asset pairs but every time I receive the same result. I use the orderbook extension just to receive the events emmited by it. And since this stack trace doesnt involve any of my own code I really think this is flaw in the code of the Orderbook.js. What would happen if we just delete this assertion line ?