Open raphjaph opened 1 month ago
any thoughts 🤔 on a new database architecture
if this happens, would the wallet db be part of the index.redb, or be it's own new db? I'm just wondering how sharing indexes would work in the future if the wallet is included as part of the index.redb.
We already have a wallet.redb
for storing pending etchings. So it's a completely seperate file from index.redb
. You can have a look at the logic in src/wallet.rs
, there you'll see two tables in the db already. If we add UTXOs to that database it would probably be something like:
define_table! { OUTPOINT_TO_UTXO_ENTRY, &OutPointValue, &UtxoEntry }
This would allow much quicker commands for subsequent calls in wallet with many utxos. It would then only fetch utxos it can see in the Bitcoin Core wallet but are not yet in the database. Would also delete utxos according to that information