hyperledger-archives / iroha

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

Storage: avoid block copying #2178

Closed MBoldyrev closed 5 years ago

MBoldyrev commented 5 years ago

Description of the Change

This change makes most block manipulation functions of storage take const blocks by shared pointer.

Benefits

Blocks can be reused - no need to copy.

Possible Drawbacks

Negligible additional cost of shared pointers creation compared to just references.

Usage Examples or Tests [optional]

Alternate Designs [optional]