Zero division
Trying to create allowance in Sia-UI One allowance is already created (just 50sc). Only 3 contracts created. So I decided to create new allowance. Unlocked wallet and pressed 'create allowance' - casual create allowance page is rendered and after few seconds error:
Sia Daemon v1.3.7
Git Revision 126260536
Loading...
(0/6) Loading siad...
(1/6) Loading gateway...
(2/6) Loading consensus...
(3/6) Loading transaction pool...
(4/6) Loading wallet...
(5/6) Loading host...
(6/6) Loading renter...
Finished loading in 1.259959757 seconds
panic: division by zero
goroutine 22494 [running]:
math/big.nat.div(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/math/big/nat.go:571 +0x450
math/big.(*Int).QuoRem(0xc42311b908, 0xc42311b8e0, 0xc42311b8b0, 0xc42311b860, 0x0, 0x0)
/usr/local/go/src/math/big/int.go:232 +0xbf
math/big.(*Int).Div(0xc42311b908, 0xc42311b8e0, 0xc42311b8b0, 0xc42311b908)
/usr/local/go/src/math/big/int.go:243 +0x6a
gitlab.com/NebulousLabs/Sia/types.Currency.Div64(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/types/currency.go:91 +0x7c
gitlab.com/NebulousLabs/Sia/modules/renter.(*Renter).PriceEstimation(0xc422a441c0, 0x0, 0xc422420930, 0x2, 0x5, 0x32, 0x32a0, 0x1950, 0x0, 0x0, ...)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/modules/renter/renter.go:374 +0x1749
gitlab.com/NebulousLabs/Sia/node/api.(*API).renterPricesHandler(0xc4201b0360, 0xb6cd20, 0xc4250a82a0, 0xc4200e6800, 0x0, 0x0, 0x0)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/node/api/renter.go:641 +0x2a2
gitlab.com/NebulousLabs/Sia/node/api.(*API).(gitlab.com/NebulousLabs/Sia/node/api.renterPricesHandler)-fm(0xb6cd20, 0xc4250a82a0, 0xc4200e6800, 0x0, 0x0, 0x0)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/node/api/routes.go:78 +0x66
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc422ffe800, 0xb6cd20, 0xc4250a82a0, 0xc4200e6800)
/home/luke/go/src/github.com/julienschmidt/httprouter/router.go:334 +0x79c
gitlab.com/NebulousLabs/Sia/node/api.RequireUserAgent.func1(0xb6cd20, 0xc4250a82a0, 0xc4200e6800)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/node/api/routes.go:187 +0xba
net/http.HandlerFunc.ServeHTTP(0xc4207f5500, 0xb6cd20, 0xc4250a82a0, 0xc4200e6800)
/usr/local/go/src/net/http/server.go:1947 +0x44
gitlab.com/NebulousLabs/Sia/node/api.cleanCloseHandler.func1.1(0xc422c842a0, 0xb68700, 0xc4207f5500, 0xb6cd20, 0xc4250a82a0, 0xc4200e6800)
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/node/api/routes.go:158 +0x79
created by gitlab.com/NebulousLabs/Sia/node/api.cleanCloseHandler.func1
/home/luke/go/src/gitlab.com/NebulousLabs/Sia/node/api/routes.go:156 +0xa0
Edited by Andrej Virgovic