hyperledger-archives / iroha

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

MST: fixed expired incoming state logic #2211

Open MBoldyrev opened 5 years ago

MBoldyrev commented 5 years ago

Description of the Change

This change removes a very strange line the rationale behind which was not found: https://github.com/hyperledger/iroha/blob/df5272c243db9eadaf737fa510af1e5566c823d0/irohad/multi_sig_transactions/impl/mst_processor_impl.cpp#L110

...and adds early removal of expired batches from incoming MstState. Also move semantics get used.

Benefits

see above

Possible Drawbacks

There remains a possibility that the removed line of code was helpful...

Usage Examples or Tests [optional]

Regarding the removed line, it broke no tests when it was commented out. Regarding the outdated batches, please see mst_processor_test MstProcessorTest.receivedOutdatedState test.

Alternate Designs [optional]