Skip to content

chore: merge develop into master#115

Merged
faustbrian merged 13 commits intomasterfrom
develop
Jul 16, 2019
Merged

chore: merge develop into master#115
faustbrian merged 13 commits intomasterfrom
develop

Conversation

@faustbrian
Copy link
Contributor

A summary of what changes this PR introduces and why they were made.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

sleepdefic1t and others added 13 commits May 29, 2019 05:13
The Arduino IDE requires the use of a single true tab separator between the keyword name and identifier. When spaces are used rather than a true tab, the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
Current tests are ran in different orders per platform.
This led to a modified global test custom_network being modified improperly.

This PR properly handles that order variation by creating a local object to be modified.

In future iterations, an AbstractNetwork will allow `const`.
Current implementation sometimes fails to properly serialize numbers in the `toJson()` method.
This is especially detrimental to some Linux builds and all Arduino IDE builds (Arduino IDE Library version (Cpp-Crypto-Arduino-v.0.3.0)).

Specifically, this PR does the following:
- moves `<cinttypes>` to `crypto_helpers.h` for non-IoT builds.
- forces type serialization for:
  - `amount` (llu/uint64_t).
  - `fee` (llu/uint64_t).
  - `network` (uint8_t/int).
  - `timestamp` (lu/uint32_t).
  - `type` (uint8_t/int).
  - `version` (uint8_t/int).
- updates the changelog.
…#105)

The current implementation only allows use with Devnet unless values are manually changed in `/src`.

This PR enables network configuration via the public api.
(Devnet, Mainnet, Testnet, and Custom Networks (bridgechains).

Specifically this PR does the following:
- Creates a Configuration class.
- Creates Fee and Network Manager children for the Configuration class.
- Allows passing a `Configuration to` Transaction Builder with a default value of `Devnet` & `StaticFees` (non-breaking).
- Adds a FeePolicy-type.
- Adds a Fee class (container for fee policies).
- Adds a Networks class (container for preset networks).
- Updates the TransactionTypes enum.
- Improves the `Network` class and Network implementions.
- Updates the `Slot` class to reflect changes (non-breaking).
- Updates Transaction-related classes to reflect updates (non-breaking).
- Adds tests for all changes.
- Updates the Arduino IDE script.
- Updates `.ino` Arduino sketches with Configuration examples.
- Updates documentation with Configuration examples.
- Updates the `keywords.txt` file to reflect changes.
- Updates the changelog.
- Updates version to `v.0.6.0`.
The current library manifest uses a wildcard `*` for the `platforms` value incorrectly signifying that it supports all platforms.

This is incorrect as the Cpp SDK's only officially support the espressif8266 & espressif32 platforms.

This PR corrects this discrepancy.
@ghost ghost added Complexity: Undetermined Needs specialized, in-depth review. Type: Task The issue is a request to setup third-party integrations or any general non-code related tasks. labels Jul 16, 2019
@codecov-io
Copy link

Codecov Report

Merging #115 into master will increase coverage by 4.24%.
The diff coverage is 89.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #115      +/-   ##
==========================================
+ Coverage   87.28%   91.52%   +4.24%     
==========================================
  Files          27       30       +3     
  Lines         739      861     +122     
==========================================
+ Hits          645      788     +143     
+ Misses         94       73      -21
Impacted Files Coverage Δ
src/include/cpp-crypto/transactions/deserializer.h 100% <ø> (ø) ⬆️
src/include/cpp-crypto/transactions/serializer.h 100% <ø> (ø) ⬆️
src/utils/message.h 100% <ø> (ø) ⬆️
src/include/cpp-crypto/transactions/transaction.h 66.66% <0%> (+66.66%) ⬆️
src/helpers/crypto.cpp 100% <100%> (+3.22%) ⬆️
src/helpers/crypto_helpers.h 100% <100%> (+50%) ⬆️
src/common/network.cpp 100% <100%> (ø)
src/managers/network_manager.cpp 100% <100%> (ø)
src/common/configuration.cpp 100% <100%> (ø)
src/include/cpp-crypto/identities/publickey.h 100% <100%> (ø) ⬆️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c489c1...5e361e3. Read the comment docs.

@faustbrian faustbrian merged commit 3b7df4c into master Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Undetermined Needs specialized, in-depth review. Type: Task The issue is a request to setup third-party integrations or any general non-code related tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants