Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix encode-call CLI options #868

Merged
merged 5 commits into from
Apr 6, 2021
Merged

Fix encode-call CLI options #868

merged 5 commits into from
Apr 6, 2021

Conversation

tomusdrw
Copy link
Contributor

@tomusdrw tomusdrw commented Apr 6, 2021

Related #863
Replaces #865

I've added a bunch of remark tests to make sure that the CLI parsing works correctly. The change was supposed to be backward compatible, but I've incorrectly set conflicts_with and forgot about default_value.

let hex = encode_call.encode().unwrap();

// then
assert!(format!("{:?}", hex).starts_with("0x080154556e69782074696d653a"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Default payload is using current time, right? So this test will always fail

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this one is not exact, but only checks the beginning (.starts_with). The timestamp comes after some prefix, so we only check the prefix.

@HCastano HCastano merged commit f737010 into master Apr 6, 2021
@HCastano HCastano deleted the td-remark-opts branch April 6, 2021 14:56
svyatonik pushed a commit that referenced this pull request Jul 17, 2023
* added Polkadot constants

* remove hardcoded constants

* cargo +nightly fmt

* add const existential deposit

* update

* cargo +nightly fmt

* not pulling

* readd constants.rs modules

* update

* Cargo.lock

* update

* add balance constants

* Update polkadot-parachains/statemine/src/constants.rs

Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com>

* cargo fmt

Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com>
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
* Add tests.

* Fix default and conflicting options.

* Fix default variant.

* Update tests.
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
* Add tests.

* Fix default and conflicting options.

* Fix default variant.

* Update tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants