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

Cleanup macro magic #5270

Merged
merged 5 commits into from
Jun 1, 2022
Merged

Cleanup macro magic #5270

merged 5 commits into from
Jun 1, 2022

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Apr 6, 2022

#5137 introduced some ugly macros which I now cleaned up:

  • Remove with_signed_payload! and signed_payload!
  • Extend with_client! to provide the concrete runtime
  • Introduce trait BenchmarkCallSigner and implement it for all 4 runtime clients
  • Use BenchmarkCallSigner together with the with_client! macro to implement frame_benchmarking_cli::ExtrinsicBuilder in a cleaner way

There now is some copy&paste code for 3 runtimes, but I think having that in a macro would only incite misuse.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Apr 6, 2022
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added 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 Apr 6, 2022
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented May 31, 2022

bot rebase

@paritytech-processbot
Copy link

Rebasing

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Jun 1, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 5f769dc into master Jun 1, 2022
@paritytech-processbot paritytech-processbot bot deleted the oty-remove-macros branch June 1, 2022 10:28
al3mart pushed a commit that referenced this pull request Jul 14, 2022
* Cleanup macro magic

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make sign_call infallible

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix build

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: parity-processbot <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. 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