From b115cb130d70973c52b19825be292d5adb94c24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= <65056371+devwckd@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:33:03 -0300 Subject: [PATCH] feat: increment storages on registration (#61) Closes CHAIN-42 --- pallets/torus0/src/agent.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pallets/torus0/src/agent.rs b/pallets/torus0/src/agent.rs index d2cd1b2..6120e38 100644 --- a/pallets/torus0/src/agent.rs +++ b/pallets/torus0/src/agent.rs @@ -113,6 +113,9 @@ pub fn register( }, ); + crate::RegistrationsThisBlock::::mutate(|value| value.saturating_add(1)); + crate::RegistrationsThisInterval::::mutate(|value| value.saturating_add(1)); + crate::Pallet::::deposit_event(crate::Event::::AgentRegistered(agent_key)); Ok(())