1

I'm curious to the design decisions for the ModuleError:

ModuleError {
    index: u8,
    error: [u8; 4],
    _,
}

This allows to describe an error within a range of 256 pallets and u32::max error index within that pallet. Why is there such a big difference?

1 Answer 1

1

In the early days, index and error used to be u8 ;)

However, there is support for nested errors and thus, it was increased to 4 bytes for the error type.

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.