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(crypto): transaction builder should build and sign versioned transactions #3831

Merged
merged 4 commits into from
Jun 29, 2020

Conversation

bertiespell
Copy link
Contributor

@bertiespell bertiespell commented Jun 25, 2020

Summary

This updates the TransactionBuilder to successfully build and sign transactions when the version number has been specifically set.

Better dx - if the version has been specifically set on the transaction, we would not expect the Builder to throw a TransactionVersionError. As requested in #3099

Adds a flag to check to de/serialisation options

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #3831 into develop will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3831      +/-   ##
===========================================
+ Coverage    91.87%   91.99%   +0.11%     
===========================================
  Files          620      620              
  Lines        14787    14795       +8     
  Branches      1853     1849       -4     
===========================================
+ Hits         13585    13610      +25     
  Misses         938      938              
+ Partials       264      247      -17     
Flag Coverage Δ
#functional 6.08% <ø> (-0.01%) ⬇️
#integration 9.59% <ø> (+<0.01%) ⬆️
#unit 90.05% <ø> (+0.12%) ⬆️
Impacted Files Coverage Δ
packages/core-p2p/src/peer-verifier.ts 99.42% <0.00%> (ø)
packages/core-kernel/src/application.ts 100.00% <0.00%> (ø)
packages/core-p2p/src/utils/check-ntp.ts 100.00% <0.00%> (ø)
packages/core-state/src/state-builder.ts 100.00% <0.00%> (ø)
packages/core-p2p/src/socket-server/server.ts 100.00% <0.00%> (ø)
...tstrap/service-providers/boot-service-providers.ts 100.00% <0.00%> (ø)
packages/core-blockchain/src/blockchain.ts 97.60% <0.00%> (+0.01%) ⬆️
...ages/core-transactions/src/handlers/transaction.ts 94.73% <0.00%> (+0.05%) ⬆️
packages/core-database/src/service-provider.ts 92.50% <0.00%> (+0.19%) ⬆️
...ap/service-providers/register-service-providers.ts 94.64% <0.00%> (+0.19%) ⬆️
... and 10 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 e943e56...0b7875b. Read the comment docs.

Copy link
Contributor

@air1one air1one left a comment

Choose a reason for hiding this comment

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

Looks good to me, just rename versionSpecified to something like disableVersionCheck so that we have a better idea of what the parameter does.

@faustbrian faustbrian merged commit 93937b2 into develop Jun 29, 2020
@ghost ghost deleted the transaction-version-defaults branch June 29, 2020 06:46
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.

None yet

3 participants