[bug]: panic integer divide by zero
hieblmi opened this issue · 1 comments
hieblmi commented
While creating an order on the Pool UI(not Pool Lite) I encountered an error which led to a crash of litd
.
2023-09-29 13:05:40.472 [INF] RPCS: New order submitted: nonce=blinded, type=Bid
panic: runtime error: integer divide by zero
goroutine 127714 [running]:
github.com/lightninglabs/pool/order.NewQuote(0xd59f80, 0x0, 0xc74, 0x7e0, 0x61a8, {0x32d2db0, 0xc0017
0c5d0})
github.com/lightninglabs/pool@v0.6.4-beta/order/tradingfees.go:133 +0x165
github.com/lightninglabs/pool.(*rpcServer).QuoteOrder(0xc000d92c00?, {0x32db1f0?, 0xc000408b40?}, 0xc
000cffe50)
I am unsure how exactly I provoked that from the UI, but the litd
code should be fixed here I guess: https://github.com/lightninglabs/pool/blob/master/order/tradingfees.go#L133C25-L133C35