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

Conversation

@simonljs
Copy link
Contributor

@simonljs simonljs commented Aug 3, 2018

I have assumed that it is the full extended version name that is desired i.e. version, commit hash, platform as used in the telemetry and when starting Polkadot.

There is already a function in service::Configuration to produce this text string so it makes sense to call into it for consistency. I have made this logic available statically however, so that it can be called before there is an instance of Configuration (which can only be created after the --version string has been set because it requires return values of clap::App)

This function could be moved outside of Configuration if preferable.

@parity-cla-bot
Copy link

It looks like @simonljs hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla-polkadot.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@gavofyork gavofyork merged commit a776972 into master Aug 3, 2018
@gavofyork gavofyork deleted the sl-version-commit-hash branch August 3, 2018 10:29
@simonljs
Copy link
Contributor Author

simonljs commented Aug 3, 2018

[clabot:check]

@parity-cla-bot
Copy link

It looks like @simonljs signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

}

/// Returns full version string, using supplied version and commit.
pub fn full_version_from_strs(impl_version: &str, impl_commit: &str) -> String {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: bad style to have a function without self parameter inside an impl block. Could you move this to a free function in the module?

{
panic_hook::set();

let full_version = service::Configuration::<<F>::Configuration, <F>::Genesis>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this type would not be necessary to specify if this were a free function. i.e. it would just be
let full_version = service::full_version_from_strs(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed up in #496

dvdplm added a commit that referenced this pull request Aug 5, 2018
* master:
  Add Links to Tags and House Style (#413)
  Add seed generation tests (#476)
  Added commit hash to --version (#489)
  use write_all instead of write (#488)
  should be MAX_IMPORTING_BLOCKS (#486)
  Use hex_literal in tests, use rustc-hex from crates (#481)
  Lower bft timeout (#483)
  force BFT delay in consensus service, not in proposer logic (#477)
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* Change genesis key

* Fix build error

* Update chain_spec

* Fix grandpa finalize gossip
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
…proof-call

Disable calls in pallet-executor
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* Add "dev_getBlockStats" RPC

* build fix
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants