hyperledger-archives / iroha

Iroha - A simple, decentralized ledger
http://iroha.tech
Apache License 2.0
988 stars 298 forks source link

Fix race bug in command service #2167

Closed muratovv closed 5 years ago

muratovv commented 5 years ago

Signed-off-by: Fedor Muratov muratovfyodor@yandex.ru

Description of the Change

Fix bug when not committed/rejected transaction will not pass to Iroha's pipeline because it is a "replay".

Benefits

Add fix for the problem. The idea of the fix to check only final statuses in the ram cache in command service. If there is a final status we will decline further checking of the transaction. Also, thanks @lebdron for cooperation in founding the bug.

Possible Drawbacks

Lack of tests. I hope we will discuss with reviewers about how to write the correct test for the situation.