Bladeren bron

drk: removed nullifier column from money coin table

skoupidi 2 jaren geleden
bovenliggende
commit
0bea8f5697
2 gewijzigde bestanden met toevoegingen van 3 en 10 verwijderingen
  1. 0 1
      bin/drk/money.sql
  2. 3 9
      bin/drk/src/money.rs

+ 0 - 1
bin/drk/money.sql

@@ -31,7 +31,6 @@ CREATE TABLE IF NOT EXISTS BZHKGQ26bzmBithTQYTJtjo2QdCqpkR9tjSBopT4yf4o_money_co
 	value_blind BLOB NOT NULL,
 	token_blind BLOB NOT NULL,
 	secret BLOB NOT NULL,
-	nullifier BLOB NOT NULL,
 	leaf_position BLOB NOT NULL,
 	memo BLOB,
 	spent_tx_hash TEXT DEFAULT '-'

+ 3 - 9
bin/drk/src/money.rs

@@ -504,22 +504,16 @@ impl Drk {
         };
         let secret: SecretKey = deserialize_async(secret_bytes).await?;
 
-        // TODO: Remove from SQL store, can be derived ondemand
-        let Value::Blob(ref nullifier_bytes) = row[10] else {
-            return Err(Error::ParseFailed("[parse_coin_record] Nullifier bytes parsing failed"))
-        };
-        let _nullifier: Nullifier = deserialize_async(nullifier_bytes).await?;
-
-        let Value::Blob(ref leaf_position_bytes) = row[11] else {
+        let Value::Blob(ref leaf_position_bytes) = row[10] else {
             return Err(Error::ParseFailed("[parse_coin_record] Leaf position bytes parsing failed"))
         };
         let leaf_position: bridgetree::Position = deserialize_async(leaf_position_bytes).await?;
 
-        let Value::Blob(ref memo) = row[12] else {
+        let Value::Blob(ref memo) = row[11] else {
             return Err(Error::ParseFailed("[parse_coin_record] Memo parsing failed"))
         };
 
-        let Value::Text(ref spent_tx_hash) = row[13] else {
+        let Value::Text(ref spent_tx_hash) = row[12] else {
             return Err(Error::ParseFailed(
                 "[parse_coin_record] Spent transaction hash parsing failed",
             ))