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

Transactions not being instantiated on block receive - Closes #3535 #3537

Merged

Conversation

2snEM6
Copy link
Contributor

@2snEM6 2snEM6 commented May 7, 2019

What was the problem?

Transactions were not being instantiated correctly when receiving a block from another peer causing the block to be rejected.

How did I fix it?

  • Converting raw transactions to its class implementation upon receiving a block.
  • Also now transactions are explicitly converted to JSON by calling toJSON in its class implementation before being broadcasted
  • Integration tests for matcher to test when a node explicitly asks for transactions, asks for blocks, receives transactions and receives blocks.

How to test it?

Run matcher integration tests npx mocha framework/test/mocha/integration/matcher.js

Review checklist

Passing custom configuration while executing
an application sandbox in a testing environment requires
merging it with the default one. This merge was being
performed using `Object.assign` which only performs a shallow
merge. Using `lodash`s `.merge` method, deep merge is achieved
This test checks if a node is successfully
rejecting transactions that are not allowed in a given context by simu
lating a peer sending transactions to the node and then asserting that
the transaction is not present in the transaction pool.
This test checks if a node is successfully
accepting transactions that are allowed in a given context by simu
lating a peer sending transactions to the node and then asserting that
the transaction is present in the transaction pool.
@2snEM6 2snEM6 requested review from lsilvs and shuse2 May 7, 2019 13:55
@2snEM6 2snEM6 self-assigned this May 7, 2019
@shuse2 shuse2 requested a review from SargeKhan May 7, 2019 14:10
@2snEM6 2snEM6 force-pushed the 3535-Transactions_not_being_instantiated_on_block_receive branch from 4ca2520 to 43529bc Compare May 7, 2019 14:40
@2snEM6 2snEM6 force-pushed the 3535-Transactions_not_being_instantiated_on_block_receive branch from 43529bc to 08bc277 Compare May 7, 2019 15:16
@2snEM6 2snEM6 requested a review from shuse2 May 7, 2019 15:16
@shuse2 shuse2 merged commit 2b402a0 into release/2.0.0 May 8, 2019
@shuse2 shuse2 deleted the 3535-Transactions_not_being_instantiated_on_block_receive branch May 8, 2019 13:36
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

4 participants