LCOV - code coverage report
Current view: top level - irohad/multi_sig_transactions/storage/impl - mst_storage.cpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 14 17 82.4 %
Date: 2018-12-05 17:11:35 Functions: 9 10 90.0 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #include <utility>
       7             : 
       8             : #include "multi_sig_transactions/storage/mst_storage.hpp"
       9             : 
      10             : namespace iroha {
      11             :   MstStorage::MstStorage() {
      12         257 :     log_ = logger::log("MstStorage");
      13         257 :   }
      14             : 
      15             :   StateUpdateResult MstStorage::apply(
      16             :       const shared_model::crypto::PublicKey &target_peer_key,
      17             :       const MstState &new_state) {
      18           3 :     std::lock_guard<std::mutex> lock{this->mutex_};
      19           3 :     return applyImpl(target_peer_key, new_state);
      20           3 :   }
      21             : 
      22             :   StateUpdateResult MstStorage::updateOwnState(const DataType &tx) {
      23          33 :     std::lock_guard<std::mutex> lock{this->mutex_};
      24          33 :     return updateOwnStateImpl(tx);
      25          33 :   }
      26             : 
      27             :   MstState MstStorage::getExpiredTransactions(const TimeType &current_time) {
      28          22 :     std::lock_guard<std::mutex> lock{this->mutex_};
      29          22 :     return getExpiredTransactionsImpl(current_time);
      30          22 :   }
      31             : 
      32             :   MstState MstStorage::getDiffState(
      33             :       const shared_model::crypto::PublicKey &target_peer_key,
      34             :       const TimeType &current_time) {
      35          23 :     std::lock_guard<std::mutex> lock{this->mutex_};
      36          23 :     return getDiffStateImpl(target_peer_key, current_time);
      37          23 :   }
      38             : 
      39             :   MstState MstStorage::whatsNew(ConstRefState new_state) const {
      40           0 :     std::lock_guard<std::mutex> lock{this->mutex_};
      41           0 :     return whatsNewImpl(new_state);
      42           0 :   }
      43             : }  // namespace iroha

Generated by: LCOV version 1.13