Closed k9ert closed 1 year ago
This is now basically solved with #40 so i'll close that here. However, @moritzwietersheim already mentioned that the user-feedback if he needs to wait for anything should be better. This is to some sort also a problem with leaky abstraction or the lack of it. It's an advantage to act as it would be Bitcoin Core Node but it's also a disadvantage if you're aware that it's not and you want to have implementation specific information like:
@moritzwietersheim : I don't think we can male reasoanbe progress on that end before we have a design idea how the user-feddback should look like.
One of the main reasons specter doesn't show the correct amounts is a not-synced node. For Spectrum, this might also be the case but there is another reason on top: Spectrum just booted up and connected to the electrum server but have not yet sunscribed to all the scripthashes it needs to. A scripthash is basically an address and this looks like this in the log:
Potentially, this could be shown as a percentage in the logs as the potential scripthashes are all in the DB. Simplified code from
spectrum.py
sync-method:So unless this loop is finished, specter might be outdated. This should clearly be reflexted in the UI. The current way of showing that looks like this: If you click on the node, you get some details of that node which currently looks like this: This is not optimal. I think it could be shown how much blocks are still too sync but both of the screenshots don't show that.
Anyway, this is about spectrum. Here, we don't have the warning, but you can only see the blockcount of the electrum-server:
So in order to give better feedback:
So how should that be implemented? I would suggest the following:
initialblockdownload=True
, i'd suggest that we implement it so that spectrum is not giving back false until the DB-sync is completed as well.getscripthashsyncinfo
which returns the status (which can be set as an attribute on the spectrum-object while syncing and the rpc-call reads it from there).spectrum.py
is way too long), like:core_rpc.py
,wallet_rpc.py
andspectrum_rpc.py
(withgetscripthashsyncinfo
as the currently only call in there)spectrum_info.jinja
.