2

This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, set_commission (a new function being added in the PR in question) and set_configs have an index clash error, within the nomination-pools pallet:

Call indices are conflicting: Both functions set_commission and set_configs are at index 11
    --> frame/nomination-pools/src/lib.rs:2237:10
     |
2237 |         pub fn set_commission(
     |                ^^^^^^^^^^^^^^

error: Call indices are conflicting: Both functions set_commission and set_configs are at index 11
    --> frame/nomination-pools/src/lib.rs:2329:10
     |
2329 |         pub fn set_configs(
     |                ^^^^^^^^^^^

  • cargo clean does not fix the issue.

1 Answer 1

1

A macro was introduced to pallets to explicitly define an index for each runtime call.

If the pallet you are working on uses this macro, ensure that newly added calls also have a call index. E.g.:

#[pallet::call_index(11)]
#[pallet::weight(T::WeightInfo::set_configs())]
pub fn set_configs(
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.