mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
walletdb: clean up
This commit is contained in:
@@ -289,39 +289,6 @@ impl WalletDb {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn put_cashier_pub(&self, key_public: &jubjub::SubgroupPoint) -> Result<()> {
|
||||
debug!(target: "WALLETDB", "Save cashier keys...");
|
||||
let conn = Connection::open(&self.path)?;
|
||||
conn.pragma_update(None, "key", &self.password)?;
|
||||
|
||||
let key_public = self.get_value_serialized(key_public)?;
|
||||
|
||||
conn.execute(
|
||||
"INSERT INTO cashier(key_public) VALUES (?1)",
|
||||
params![key_public],
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
//pub fn get_cashier_public_keys(&self) -> Result<Vec<jubjub::SubgroupPoint>> {
|
||||
// debug!(target: "WALLETDB", "Returning Cashier Public key...");
|
||||
// let conn = Connection::open(&self.path)?;
|
||||
// conn.pragma_update(None, "key", &self.password)?;
|
||||
|
||||
// let mut stmt = conn.prepare("SELECT key_public FROM cashier")?;
|
||||
|
||||
// let key_iter = stmt.query_map([], |row| row.get(0))?;
|
||||
|
||||
// let mut pub_keys = Vec::new();
|
||||
|
||||
// for key in key_iter {
|
||||
// let public: jubjub::SubgroupPoint = self.get_value_deserialized(&key?)?;
|
||||
// pub_keys.push(public);
|
||||
// }
|
||||
|
||||
// Ok(pub_keys)
|
||||
//}
|
||||
|
||||
pub fn get_balances(&self) -> Result<HashMap<Vec<u8>, u64>> {
|
||||
debug!(target: "WALLETDB", "Get token and balances...");
|
||||
let conn = Connection::open(&self.path)?;
|
||||
|
||||
Reference in New Issue
Block a user