LiskArchive / lisk-elements

⚙️ Library for sending Lisk transactions from the client or server
https://lisk.io/
GNU General Public License v3.0
250 stars 64 forks source link

Fix the bug in verifying validated transactions - Closes #963 #1039

Closed SargeKhan closed 5 years ago

SargeKhan commented 5 years ago

What was the problem?

There was an edge case where if transactions in the validated queue are being verified, and during this operation, the blockchain state changes, the transactions will be moved to the verified queue although they were verified against the old blockchain state.

How did I fix it?

When transactions which exist in the validated queue are affected by the blockchain state change, they are moved to the received queue. This ensures that the race condition between blockchain state change event and verifying transactions is prevented.

How to test it?

Run tests.

Review checklist