12 Commits

Author SHA1 Message Date
Vladimir Fomene
558e37afa7
Use T: AsRef<Path> as param to SqliteDatabase::new
Currently SqliteDatabase::new takes a String as path,
with this change, it now accepts any type that implements
AsRef<Path>.
2022-07-29 17:39:12 +03:00
KaFai Choi
e68d3b9e63
remove Database::flush 2022-06-29 12:39:49 +07:00
Philipp Hoenisch
d9b9b3dc46
Fix InvalidColumnIndex error
This query returns 7 columns, so last columns is index 6
2022-06-03 15:28:43 +10:00
Steve Myers
0b1a399f4e
Update sqlite schema with unique index for utxos, change insert_utxo to upsert 2022-05-19 13:20:11 -07:00
Daniela Brozzoni
f2f0efc0b3
Never delete spent utxos from the database
A `is_spent` field is added to LocalUtxo; when a txo is spent we set
this field to true instead of deleting the entire utxo from the
database.
This allows us to create txs double-spending txs already in blockchain.
Listunspent won't return spent utxos, effectively excluding them from the
coin selection and balance calculation
2022-03-10 11:58:23 +01:00
Steve Myers
1999d97aeb
Remove verify flag from TransactionDetails via new MIGRATIONS 2022-02-21 17:31:48 -08:00
rajarshimaitra
6a09075d1a
Remove verify flag from sqlite DB 2022-02-09 12:30:32 +05:30
Alekos Filini
5830226216
[database] Wrap BlockTime in another struct to allow adding more
fields in the future
2021-11-10 12:30:42 +01:00
Alekos Filini
2c77329333
Rename ConfirmationTime to BlockTime 2021-11-10 12:30:38 +01:00
Alekos Filini
2892edf94b
[db] Add the last_sync_time database entry
This will be used to store the height and timestamp after every sync.
2021-11-10 12:29:47 +01:00
Steve Myers
919522a456
Fix clippy warning 2021-09-23 18:57:55 -07:00
John Cantrell
c06d9f1d33
implement sqlite database 2021-09-23 20:54:08 -04:00