I think I found some bug in Chapter 7: LiquidityProvider.py
def lookup_orders(self, id) (line 11) returns a tuple of (None, None) or (o, count).
But generate_random_order(self) lines 35-40 compares the tuple with a None, making new_order always False
And line 52, shouldn't it be if new_order instead of if not new_order? If it is a new_order, we want to increase the order_id and append the new order ord to self.orders
I think I found some bug in Chapter 7: LiquidityProvider.py
def lookup_orders(self, id)
(line 11) returns a tuple of(None, None)
or(o, count)
.But
generate_random_order(self)
lines 35-40 compares the tuple with aNone
, makingnew_order
alwaysFalse
And line 52, shouldn't it be
if new_order
instead ofif not new_order
? If it is a new_order, we want to increase theorder_id
and append the new orderord
toself.orders