From 9de02d10e737c0c29ec8c32d1713ba854ac376c9 Mon Sep 17 00:00:00 2001 From: Just van Stam Date: Tue, 2 Apr 2024 14:39:24 +0200 Subject: [PATCH] fix live node storage --- pallets/oracle-ocw/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pallets/oracle-ocw/src/lib.rs b/pallets/oracle-ocw/src/lib.rs index 82a4f7ae2..c39de5abc 100644 --- a/pallets/oracle-ocw/src/lib.rs +++ b/pallets/oracle-ocw/src/lib.rs @@ -151,6 +151,10 @@ pub mod pallet { (AssetName::PLMC, Zero::zero()), ]), }; + // Fix for missing PLMC in last_send_for_assets for old nodes, that did not have PLMC in the list. + if !last_send_for_assets.contains_key(&AssetName::PLMC) { + last_send_for_assets.insert(AssetName::PLMC, Zero::zero()); + }; let assets = last_send_for_assets .iter() .filter_map(|(asset_name, last_send)| {