Просмотр исходного кода

money/token_mint: Remove spurious comment from TokenMint

x 4 месяцев назад
Родитель
Сommit
d4e1c33592

+ 1 - 3
src/contract/money/src/entrypoint/token_mint_v1.rs

@@ -88,11 +88,9 @@ pub(crate) fn money_token_mint_process_instruction_v1(
     let self_ = &calls[call_idx].data;
     let params: MoneyTokenMintParamsV1 = deserialize(&self_.data[1..])?;
 
-    // We have to check if the token mint is frozen, and if by some chance
-    // the minted coin has existed already.
+    // Check that the coin from the output hasn't existed before
     let coins_db = wasm::db::db_lookup(cid, MONEY_CONTRACT_COINS_TREE)?;
 
-    // Check that the coin from the output hasn't existed before
     if wasm::db::db_contains_key(coins_db, &serialize(&params.coin))? {
         msg!("[TokenMintV1] Error: Duplicate coin in output");
         return Err(MoneyError::DuplicateCoin.into())

+ 0 - 4
src/contract/money/src/model/token_id.rs

@@ -32,10 +32,6 @@ use darkfi_serial::async_trait;
 use super::poseidon_hash;
 
 lazy_static! {
-    // Is this even needed? Not used elsewhere except here.
-    /// Derivation prefix for `TokenId`
-    pub static ref TOKEN_ID_PREFIX: pallas::Base = pallas::Base::from(69);
-
     /// Native DARK token ID.
     /// It does not correspond to any real commitment since we only rely on this value as
     /// a constant.