`payment_queryInfo`: Make it work with `WeightV2` (#12633)
* `payment_queryInfo`: Make it work with `WeighV2` The runtime api for querying the payment info depends on the `Weight` type and broke for old runtimes that still use the `WeighV1`. This pull requests fixes this by: 1. Bumping the version of the runtime api. 2. Making the node side code use the correct runtime api function depending on the version of the runtime api. 3. Make the RPC always return `WeighV1`. Users of the api should switch to `state_call` and decide based on the version of the runtime api which `Weight` type is being returned. * Fix tests * Review comment
Showing
- substrate/Cargo.lock 2 additions, 0 deletionssubstrate/Cargo.lock
- substrate/frame/transaction-payment/rpc/Cargo.toml 1 addition, 0 deletionssubstrate/frame/transaction-payment/rpc/Cargo.toml
- substrate/frame/transaction-payment/rpc/runtime-api/Cargo.toml 2 additions, 0 deletions...rate/frame/transaction-payment/rpc/runtime-api/Cargo.toml
- substrate/frame/transaction-payment/rpc/runtime-api/src/lib.rs 4 additions, 0 deletions...rate/frame/transaction-payment/rpc/runtime-api/src/lib.rs
- substrate/frame/transaction-payment/rpc/src/lib.rs 38 additions, 9 deletionssubstrate/frame/transaction-payment/rpc/src/lib.rs
- substrate/frame/transaction-payment/src/types.rs 11 additions, 4 deletionssubstrate/frame/transaction-payment/src/types.rs
- substrate/primitives/weights/src/lib.rs 3 additions, 3 deletionssubstrate/primitives/weights/src/lib.rs
Please register or sign in to comment