Explorar o código

drk/money: handle BurnV1 in money_call_nullifiers()

x hai 4 días
pai
achega
f8f585c694
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      bin/drk/src/money.rs

+ 7 - 1
bin/drk/src/money.rs

@@ -1098,7 +1098,7 @@ impl Drk {
         Ok((wallet_spent_coins || !owncoins.is_empty() || wallet_freezes, block_signing_key))
         Ok((wallet_spent_coins || !owncoins.is_empty() || wallet_freezes, block_signing_key))
     }
     }
 
 
-    /// Auxiliary function to  grab all the nullifiers from a transaction money call.
+    /// Auxiliary function to grab all the nullifiers from a transaction money call.
     async fn money_call_nullifiers(&self, call: &DarkLeaf<ContractCall>) -> Result<Vec<Nullifier>> {
     async fn money_call_nullifiers(&self, call: &DarkLeaf<ContractCall>) -> Result<Vec<Nullifier>> {
         let mut nullifiers: Vec<Nullifier> = vec![];
         let mut nullifiers: Vec<Nullifier> = vec![];
 
 
@@ -1115,6 +1115,12 @@ impl Drk {
                     nullifiers.push(input.nullifier);
                     nullifiers.push(input.nullifier);
                 }
                 }
             }
             }
+            MoneyFunction::BurnV1 => {
+                let params: MoneyBurnParamsV1 = deserialize_async(&data[1..]).await?;
+                for input in params.inputs {
+                    nullifiers.push(input.nullifier);
+                }
+            }
             _ => { /* Do nothing */ }
             _ => { /* Do nothing */ }
         }
         }