mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 09:51:10 +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
@@ -70,6 +70,14 @@ macro_rules! declare_bridge_reject_obsolete_messages {
|
||||
|
||||
let inbound_lane_data = pallet_bridge_messages::InboundLanes::<$runtime, $instance>::get(&proof.lane);
|
||||
if proof.nonces_end <= inbound_lane_data.last_delivered_nonce() {
|
||||
log::trace!(
|
||||
target: pallet_bridge_messages::LOG_TARGET,
|
||||
"Rejecting obsolete messages delivery transaction: lane {:?}, bundled {:?}, best {:?}",
|
||||
proof.lane,
|
||||
proof.nonces_end,
|
||||
inbound_lane_data.last_delivered_nonce(),
|
||||
);
|
||||
|
||||
return sp_runtime::transaction_validity::InvalidTransaction::Stale.into();
|
||||
}
|
||||
|
||||
@@ -84,6 +92,14 @@ macro_rules! declare_bridge_reject_obsolete_messages {
|
||||
|
||||
let outbound_lane_data = pallet_bridge_messages::OutboundLanes::<$runtime, $instance>::get(&proof.lane);
|
||||
if latest_delivered_nonce <= outbound_lane_data.latest_received_nonce {
|
||||
log::trace!(
|
||||
target: pallet_bridge_messages::LOG_TARGET,
|
||||
"Rejecting obsolete messages confirmation transaction: lane {:?}, bundled {:?}, best {:?}",
|
||||
proof.lane,
|
||||
latest_delivered_nonce,
|
||||
outbound_lane_data.latest_received_nonce,
|
||||
);
|
||||
|
||||
return sp_runtime::transaction_validity::InvalidTransaction::Stale.into();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user