From 8d664c0cb7f03b09dd6c470ba260c35525868d63 Mon Sep 17 00:00:00 2001 From: qima Date: Fri, 10 May 2024 17:53:16 +0800 Subject: [PATCH] WIP --- sn_transfers/src/genesis.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sn_transfers/src/genesis.rs b/sn_transfers/src/genesis.rs index cae6883a89..1965dda896 100644 --- a/sn_transfers/src/genesis.rs +++ b/sn_transfers/src/genesis.rs @@ -149,7 +149,15 @@ pub fn create_first_cash_note_from_key( amount: NanoTokens::from(GENESIS_CASHNOTE_AMOUNT), }; - let reason = SpendReason::default(); + let reason = match SpendReason::create_reward_tracking_reason("GENESIS") { + Ok(spend_reason) => spend_reason, + Err(err) => { + error!("Failed to generate spend_reason for genesis {err:?}"); + return Err(Error::GenesisCashNoteError(format!( + "Failed to generate spend reason for genesis CashNote: {err}", + ))); + } + }; let cash_note_builder = TransactionBuilder::default() .add_input(