SiaFoundation / walletd

A new Sia wallet
https://sia.tech/software/walletd
MIT License
14 stars 6 forks source link

Fix panic when calling subscribe #92

Closed n8maninger closed 3 months ago

n8maninger commented 4 months ago

Fixes an underflow panic when calling resubscribe

n8maninger commented 3 months ago

@n8maninger trying this branch I get the following crash on startup:

% sh start.sh
walletd v0.1.0
env: Using WALLETD_API_PASSWORD environment variable
DEBUG   couldn't discover UPnP router   {"error": "no UPnP-enabled gateway found"}
INFO    stdlib  p2p: Listening on [::]:9981
INFO    stdlib  api: Listening on 127.0.0.1:9980
FATAL   wallet  failed to subscribe to chain manager    {"error": "failed to update chain state: transaction failed (attempt 1): failed to update chain state: failed to apply chain update \"60560::05b73ec1\": failed to get matured siacoin elements: failed to query siacoin elements: no such column: matured"}

You’ll need to erase your database file. I’m not writing schema migrations yet