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(core-transaction-pool): pass correct transaction data #1564

Merged
merged 1 commit into from Dec 4, 2018

Conversation

Projects
None yet
3 participants
@supaiku0
Contributor

supaiku0 commented Dec 3, 2018

Proposed changes

Passing transaction to wallet.canApply is wrong, as the timestamp is modified by the Block constructor to match its own timestamp. We need to pass transaction.data as we only have here the unmodified timestamp which was used to calculate the signature(s).

Second signature transactions no longer cause a double spend error.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@supaiku0 supaiku0 requested review from kristjank and faustbrian Dec 3, 2018

@wafflebot wafflebot bot added the review label Dec 3, 2018

@codecov-io

This comment has been minimized.

codecov-io commented Dec 3, 2018

Codecov Report

Merging #1564 into develop will increase coverage by 0.12%.
The diff coverage is 60%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1564      +/-   ##
===========================================
+ Coverage    74.75%   74.87%   +0.12%     
===========================================
  Files          439      439              
  Lines         7894     7894              
  Branches      1038     1038              
===========================================
+ Hits          5901     5911      +10     
+ Misses        1770     1763       -7     
+ Partials       223      220       -3
Impacted Files Coverage Δ
packages/core-transaction-pool/lib/interface.js 69.41% <60%> (ø) ⬆️
...p2p/lib/server/versions/internal/handlers/utils.js 86.66% <0%> (+6.66%) ⬆️
packages/core-forger/lib/manager.js 80.58% <0%> (+8.73%) ⬆️

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 b0e5772...c78172a. Read the comment docs.

@faustbrian faustbrian merged commit 867d9ea into ArkEcosystem:develop Dec 4, 2018

4 checks passed

ci/circleci: depcheck-lint Your tests passed on CircleCI!
Details
ci/circleci: test-node10-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-2 Your tests passed on CircleCI!
Details

@wafflebot wafflebot bot removed the review label Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment