Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

node-template: remove redundant types from runtime #9161

Merged
2 commits merged into from
Jun 23, 2021

Conversation

disconnect3d
Copy link
Contributor

Removes BlockId, SignedBlock and CheckedExtrinsic as they are unused within the runtime currently and the BlockId was defined twice.

Removes `BlockId`, `SignedBlock` and `CheckedExtrinsic` as they are
unused within the runtime currently and the `BlockId` was defined twice.
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jun 21, 2021

User @disconnect3d, please sign the CLA here.

@disconnect3d
Copy link
Contributor Author

disconnect3d commented Jun 21, 2021

To add on this, this was flagged by the https://github.com/est31/warnalyzer tool, along with some other stuff:

node/src/cli.rs:16:6: unused Field '0'
node/src/cli.rs:18:12: unused Field '0'
node/src/cli.rs:21:13: unused Field '0'
node/src/cli.rs:24:15: unused Field '0'
node/src/cli.rs:27:14: unused Field '0'
node/src/cli.rs:30:15: unused Field '0'
node/src/cli.rs:33:13: unused Field '0'
node/src/cli.rs:36:9: unused Field '0'
node/src/cli.rs:40:12: unused Field '0'
node/src/main.rs:1:1: unused Mod ''
node/src/main.rs:11:4: unused Function 'main'
pallets/template/src/lib.rs:32:20: unused Type 'T'
pallets/template/src/lib.rs:40:21: unused Type 'T'
pallets/template/src/lib.rs:50:19: unused Field '0'
pallets/template/src/lib.rs:50:24: unused Field '1'
pallets/template/src/lib.rs:55:17: unused Type 'T'
pallets/template/src/lib.rs:73:56: unused Field '0'
runtime/src/lib.rs:57:10: unused Type 'AccountIndex'
runtime/src/lib.rs:69:10: unused Type 'DigestItem'
runtime/src/lib.rs:85:11: unused Type 'BlockId'
runtime/src/lib.rs:127:11: unused Const 'DAYS'
runtime/src/lib.rs:304:10: unused Type 'SignedBlock'
runtime/src/lib.rs:306:10: unused Type 'BlockId'
runtime/src/lib.rs:320:10: unused Type 'CheckedExtrinsic'

The AccountIndex and DigestItem are already proposed to be removed in #9149 and the AccountIndex removal was also merged to the substrate-node-template repo in https://github.com/substrate-developer-hub/substrate-node-template/pull/204.

Note that I am not removing the DAYS here as I believe it may be useful for devs to have it around and not calculate by themself?

@bkchr bkchr added A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jun 21, 2021
@bkchr
Copy link
Member

bkchr commented Jun 21, 2021

bot merge

ty

@bkchr
Copy link
Member

bkchr commented Jun 21, 2021

@disconnect3d please merge master

@bkchr
Copy link
Member

bkchr commented Jun 23, 2021

ping @disconnect3d

@shawntabrizi
Copy link
Member

bot merge

@ghost
Copy link

ghost commented Jun 23, 2021

Waiting for commit status.

@ghost ghost merged commit 4d792cf into paritytech:master Jun 23, 2021
athei pushed a commit that referenced this pull request Jun 25, 2021
Removes `BlockId`, `SignedBlock` and `CheckedExtrinsic` as they are
unused within the runtime currently and the `BlockId` was defined twice.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants