Statemint Should Not Recognise DOT Reserves (#1318)

* recognise no reserves

* adjust should_execute

* docs and pass should_execute

* typo
This commit is contained in:
joe petrowski
2022-06-01 13:11:31 +02:00
committed by GitHub
parent e403b268d4
commit 0c4a9f0801
5 changed files with 18 additions and 7 deletions
+3 -2
View File
@@ -52,13 +52,14 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
return Err(()) // Deny
}
// allow reserve transfers to arrive from relay chain
// An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve`
// should not allow this, but we just log it here.
if matches!(origin, MultiLocation { parents: 1, interior: Here }) &&
message.0.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. }))
{
log::warn!(
target: "xcm::barrier",
"Unexpected ReserveAssetDeposited from the relay chain",
"Unexpected ReserveAssetDeposited from the Relay Chain",
);
}
// Permit everything else