mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
Add another condition to the reject-obsolete-parachain-heads extension (#1505)
* add another condition to the reject-obsolete-parachain-heads extension * add tracing to obsolete-tx-extensions * fix tests * extension_rejects_header_from_new_relay_block_with_same_hash * fmt * fix benchmarks
This commit is contained in:
committed by
Bastian Köcher
parent
e9d7adf8fd
commit
ea1f46ff45
@@ -75,6 +75,13 @@ macro_rules! declare_bridge_reject_obsolete_grandpa_header {
|
||||
if best_finalized_number < bundled_block_number {
|
||||
Ok(sp_runtime::transaction_validity::ValidTransaction::default())
|
||||
} else {
|
||||
log::trace!(
|
||||
target: $crate::LOG_TARGET,
|
||||
"Rejecting obsolete bridged header: bundled {:?}, best {:?}",
|
||||
bundled_block_number,
|
||||
best_finalized_number,
|
||||
);
|
||||
|
||||
sp_runtime::transaction_validity::InvalidTransaction::Stale.into()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -60,7 +60,7 @@ pub use pallet::*;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
/// The target that will be used when publishing logs related to this pallet.
|
||||
const LOG_TARGET: &str = "runtime::bridge-grandpa";
|
||||
pub const LOG_TARGET: &str = "runtime::bridge-grandpa";
|
||||
|
||||
/// Block number of the bridged chain.
|
||||
pub type BridgedBlockNumber<T, I> = BlockNumberOf<<T as Config<I>>::BridgedChain>;
|
||||
|
||||
Reference in New Issue
Block a user