fix: Complete snowbridge pezpallet rebrand and critical bug fixes
- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs) - pallet/ directories → pezpallet/ (4 locations) - Fixed pezpallet.rs self-include recursion bug - Fixed sc-chain-spec hardcoded crate name in derive macro - Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API) - Added BizinikiwiConfig type alias for zombienet tests - Deleted obsolete session state files Verified: pezsnowbridge-pezpallet-*, pezpallet-staking, pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
@@ -82,14 +82,14 @@ where
|
||||
B: Block,
|
||||
BE: AuxStore,
|
||||
{
|
||||
// Initialize gadget best_canon from AUX DB or from pallet genesis.
|
||||
// Initialize gadget best_canon from AUX DB or from pezpallet genesis.
|
||||
if let Some(best) = load_state::<B, BE>(backend)? {
|
||||
info!(target: LOG_TARGET, "Loading MMR best canonicalized state from db: {:?}.", best);
|
||||
Ok(best)
|
||||
} else {
|
||||
info!(
|
||||
target: LOG_TARGET,
|
||||
"Loading MMR from pallet genesis on what appears to be the first startup: {:?}.",
|
||||
"Loading MMR from pezpallet genesis on what appears to be the first startup: {:?}.",
|
||||
default
|
||||
);
|
||||
write_current_version(backend)?;
|
||||
|
||||
@@ -66,7 +66,7 @@ where
|
||||
BE: Backend<B>,
|
||||
Self::Api: MmrApi<B, MmrRootHash, NumberFor<B>>,
|
||||
{
|
||||
/// Get the block number where the mmr pallet was added to the runtime.
|
||||
/// Get the block number where the mmr pezpallet was added to the runtime.
|
||||
fn first_mmr_block_num(&self, notification: &FinalityNotification<B>) -> Option<NumberFor<B>> {
|
||||
let best_block_hash = notification.header.hash();
|
||||
let best_block_number = *notification.header.number();
|
||||
|
||||
@@ -167,7 +167,7 @@ where
|
||||
_ => return,
|
||||
};
|
||||
|
||||
// Don't canonicalize branches corresponding to blocks for which the MMR pallet
|
||||
// Don't canonicalize branches corresponding to blocks for which the MMR pezpallet
|
||||
// wasn't yet initialized.
|
||||
if header.number < self.first_mmr_block {
|
||||
return;
|
||||
@@ -263,7 +263,7 @@ where
|
||||
/// _canonical key_.
|
||||
/// Prune leafs and nodes added by stale blocks in offchain db from _fork-aware key_.
|
||||
pub fn canonicalize_and_prune(&mut self, notification: FinalityNotification<B>) {
|
||||
// Update the first MMR block in case of a pallet reset.
|
||||
// Update the first MMR block in case of a pezpallet reset.
|
||||
self.handle_potential_pallet_reset(¬ification);
|
||||
|
||||
// Move offchain MMR nodes for finalized blocks to canonical keys.
|
||||
@@ -328,7 +328,7 @@ mod tests {
|
||||
run_test_with_pezmmr_gadget(|client| async move {
|
||||
// G -> A1 -> A2 -> A3 -> A4 -> A5
|
||||
// | |
|
||||
// | | -> pallet reset
|
||||
// | | -> pezpallet reset
|
||||
// |
|
||||
// | -> first finality notification
|
||||
|
||||
@@ -427,7 +427,7 @@ mod tests {
|
||||
// | | | -> gadget start
|
||||
// | |
|
||||
// | | -> finalized before gadget start (missed notification)
|
||||
// | | + pallet reset
|
||||
// | | + pezpallet reset
|
||||
// |
|
||||
// | -> first mmr block
|
||||
let blocks = mmr_blocks.lock();
|
||||
|
||||
Reference in New Issue
Block a user