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

Remove requirement of function indices for decl_module! #666

Merged
merged 1 commit into from
Sep 5, 2018

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Sep 5, 2018

With this patch, the decl_module! macro does not require function indices.
This implementation has two drawbacks:

  1. The json function id looks like "0 + 1 + 1" for the second index. Its not that huge problem, as the sum should be easily implementable in javascript.
  2. The encoder and decoder implementations switch from using match to ifs. This could have some impact on the performance.

@bkchr bkchr force-pushed the decl_module_do_not_require_function_index branch from 19b90d0 to 5cee050 Compare September 5, 2018 10:45
@bkchr bkchr force-pushed the decl_module_do_not_require_function_index branch from 5cee050 to db21e31 Compare September 5, 2018 11:14
@gavofyork gavofyork merged commit c0897ac into master Sep 5, 2018
@gavofyork gavofyork deleted the decl_module_do_not_require_function_index branch September 5, 2018 11:42
dvdplm added a commit that referenced this pull request Sep 5, 2018
* master:
  Remove requirement of function indices for decl_module! (#666)
  DigestItem trait (v2) (#650)
dvdplm added a commit that referenced this pull request Sep 8, 2018
…rs-generic-over-hasher-and-rlpcodec

* origin/master:
  Fixed sync stalling when import queue is full (#691)
  New extrinsic dispatch model (#678)
  remove parachain's Cargo.lock (#682)
  Implement json metadata for outer events (#672)
  Improvements to the Kademlia system (#688)
  Use BufReader and BufWriter (#684)
  Switch to using parity/rust:substrate which has rust nightly-2018-08-31 (#686)
  Update to latest libp2p (#673)
  Implement storage json metadata (#670)
  impl MaybeEmpty for H256 and u64 (aka AccountId in prod/tests) (#665)
  Speedup compilation (#671)
  Remove requirement of function indices for decl_module! (#666)
  DigestItem trait (v2) (#650)
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.

2 participants