Remove as<u64> for BlockNumber and or else#2322
Conversation
|
Is this only an attempt to clean the core and block number from I remember this approach suggested in a comment and it seems like it should be applied to all modules, including those that use block number etc:
|
|
We can do that step by step. First I wanted to remove As from simple arithmetic and see what is the codebase that make use of it. This PR was just a draft to see what was affected. It appears to be wideley used by blocknumber to be converted back and forth. limiting its actual genericity. I think the conclusion from discussions was to make blocknumber generic everywhere. (which is borring because we add a new parameter to every structure there, or maybe we can make a trait with associated type but then deriving is wrong so has to be done manually). About modules usage of As I think they should be removed as you suggested. Hmm I pushed the PR to show my research but this is not a PR. Maybe I should clause it and just linked the branch through as issue.. |
|
Okay, then I close this pr. |
This PR is nowhere near being mergable. It is just an first attempt to remove
as<u64>from simple arithmetic and show progress on it.For now it only add a generic BlockNumber to some structures in core.
Current issue: