Function pallet_xcm_bridge_hub::pallet::dispatchables::close_bridge
source · pub fn close_bridge<T: Config<I>, I: 'static>(
bridge_destination_universal_location: Box<VersionedInteriorLocation>,
may_prune_messages: MessageNonce,
)
Expand description
Try to close the bridge.
Can only be called by the “owner” of this side of the bridge, meaning that the inbound XCM channel with the local origin chain is working.
Closed bridge is a bridge without any traces in the runtime storage. So this method first tries to prune all queued messages at the outbound lane. When there are no outbound messages left, outbound and inbound lanes are purged. After that, funds are returned back to the owner of this side of the bridge.
The number of messages that we may prune in a single call is limited by the
may_prune_messages
argument. If there are more messages in the queue, the method
prunes exactly may_prune_messages
and exits early. The caller may call it again
until outbound queue is depleted and get his funds back.
The states after this call: everything is either Closed
, or purged from the
runtime storage.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::close_bridge
.