wizardsardine / liana

The missing safety net for your coins
https://wizardsardine.com/liana
BSD 3-Clause "New" or "Revised" License
304 stars 51 forks source link

[GUI] Get genesis timestamp from bitcoind #956

Open pythcoiner opened 7 months ago

pythcoiner commented 7 months ago

https://github.com/wizardsardine/liana/blob/3fcbb0b67d358f90bd54437712a624495c0b1962/gui/src/app/state/settings/bitcoind.rs#L373-L410

in the same way than here i think we can get the genesis timestamp from bitcoind instead using hardcoded value (and expect user will not give older timestamp for regtest)

darosior commented 7 months ago

Where does the GUI uses the genesis timestamp? The GUI does not connect to bitcoind itself, so if it needs the genesis timestamp it needs to be routed through lianad.

pythcoiner commented 7 months ago

Where does the GUI uses the genesis timestamp? The GUI does not connect to bitcoind itself, so if it needs the genesis timestamp it needs to be routed through lianad.

it does not, need to add a command on daemon side, i can tackle that if you think its a good move

RandyMcMillan commented 7 months ago

hard code AND grab it from other sources - including a local bitcoin node and maybe a simple curl to mempool.space or whatever - assert equal for all values returned from the sources. A simple sanity check?