From f72387c9cbf3e9d140687685b4e0a146f24679d8 Mon Sep 17 00:00:00 2001 From: Uncle Stinky Date: Sat, 10 Oct 2026 18:17:08 +0300 Subject: [PATCH] fix for https://ghostforum.org/t/critical-unlimited-token-minting-via-weaver-session-replay/100 Signed-off-by: Uncle Stinky --- pallets/weaver/Cargo.toml | 2 +- pallets/weaver/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/weaver/Cargo.toml b/pallets/weaver/Cargo.toml index 7a0bd2b..1507fa2 100644 --- a/pallets/weaver/Cargo.toml +++ b/pallets/weaver/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghost-weaver" -version = "0.0.18" +version = "0.0.19" description = "Weaving a secure cryptographic tapestry across different external chains." license.workspace = true authors.workspace = true diff --git a/pallets/weaver/src/lib.rs b/pallets/weaver/src/lib.rs index 4b87b1e..f8935bc 100644 --- a/pallets/weaver/src/lib.rs +++ b/pallets/weaver/src/lib.rs @@ -509,8 +509,9 @@ pub mod pallet { CurrentWeavingSession::::insert(&network_id, next_session); } - weight.saturating_accrue(T::DbWeight::get().writes(1)); + weight.saturating_accrue(T::DbWeight::get().writes(2)); TapestryDrafts::::remove(&network_id); + WeavingStates::::remove(&network_id); } } None => {