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

Merged
merged 1 commit into from
Dec 4, 2018
Merged

fix(core-transaction-pool): pass correct transaction data #1564

merged 1 commit into from
Dec 4, 2018

Conversation

spkjp
Copy link
Contributor

@spkjp spkjp 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)

@ghost ghost assigned spkjp Dec 3, 2018
@ghost ghost added the review label Dec 3, 2018
@codecov-io
Copy link

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
@ghost ghost 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants