In the TransactionExtension interface, the post_dispatch_details interface returns a Weight. This is specifically the amount of unspent weight by the transaction relative to the worst case weight estimated in TransactionExtension::weight.
As per this comment, the returned weight is usually the actual weight used, like in call dispatch. This can lead to confusion for developers, so we should introduce a type around the returned Weight to clearly make them different, without a default or From/Into so that the dev has to see the type.
Follow up on #3685
In the
TransactionExtension
interface, thepost_dispatch_details
interface returns aWeight
. This is specifically the amount of unspent weight by the transaction relative to the worst case weight estimated inTransactionExtension::weight
.As per this comment, the returned weight is usually the actual weight used, like in call dispatch. This can lead to confusion for developers, so we should introduce a type around the returned
Weight
to clearly make them different, without a default orFrom
/Into
so that the dev has to see the type.