From d4e1c335922692a9ddb7b3687608dc70975cb787 Mon Sep 17 00:00:00 2001 From: x Date: Wed, 18 Mar 2026 09:42:11 +0000 Subject: [PATCH] money/token_mint: Remove spurious comment from TokenMint --- src/contract/money/src/entrypoint/token_mint_v1.rs | 4 +--- src/contract/money/src/model/token_id.rs | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/contract/money/src/entrypoint/token_mint_v1.rs b/src/contract/money/src/entrypoint/token_mint_v1.rs index b9e406569..1a5b53201 100644 --- a/src/contract/money/src/entrypoint/token_mint_v1.rs +++ b/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(¶ms.coin))? { msg!("[TokenMintV1] Error: Duplicate coin in output"); return Err(MoneyError::DuplicateCoin.into()) diff --git a/src/contract/money/src/model/token_id.rs b/src/contract/money/src/model/token_id.rs index 27548d9f6..e0faac5c0 100644 --- a/src/contract/money/src/model/token_id.rs +++ b/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.