Skip to content
Unverified Commit f31c70aa authored by Francisco Aguirre's avatar Francisco Aguirre Committed by GitHub
Browse files

Added fallback_max_weight to Transact for sending messages to V4 chains (#6643)



Closes: https://github.com/paritytech/polkadot-sdk/issues/6585

Removing the `require_weight_at_most` parameter in V5 Transact had only
one problem. Converting a message from V5 to V4 to send to chains that
didn't upgrade yet. The conversion would not know what weight to give to
the Transact, since V4 and below require it.

To fix this, I added back the weight in the form of an `Option<Weight>`
called `fallback_max_weight`. This can be set to `None` if you don't
intend to deal with a chain that hasn't upgraded yet. If you set it to
`Some(_)`, the behaviour is the same. The plan is to totally remove this
in V6 since there will be a good conversion path from V6 to V5.

---------

Co-authored-by: default avatarGitHub Action <[email protected]>
Co-authored-by: default avatarAdrian Catangiu <[email protected]>
parent 4f43b72f
Pipeline #508314 waiting for manual action with stages
in 1 hour, 11 minutes, and 25 seconds