-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: artyom-yurin <[email protected]>
- Loading branch information
Showing
23 changed files
with
753 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
shared_model/backend/protobuf/commands/impl/proto_compare_and_set_account_detail.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright Soramitsu Co., Ltd. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "backend/protobuf/commands/proto_compare_and_set_account_detail.hpp" | ||
|
||
namespace shared_model { | ||
namespace proto { | ||
|
||
CompareAndSetAccountDetail::CompareAndSetAccountDetail( | ||
iroha::protocol::Command &command) | ||
: compare_and_set_account_detail_{ | ||
command.compare_and_set_account_detail()} {} | ||
|
||
const interface::types::AccountIdType & | ||
CompareAndSetAccountDetail::accountId() const { | ||
return compare_and_set_account_detail_.account_id(); | ||
} | ||
|
||
const interface::types::AccountDetailKeyType & | ||
CompareAndSetAccountDetail::key() const { | ||
return compare_and_set_account_detail_.key(); | ||
} | ||
|
||
const interface::types::AccountDetailValueType & | ||
CompareAndSetAccountDetail::value() const { | ||
return compare_and_set_account_detail_.value(); | ||
} | ||
|
||
const boost::optional<interface::types::AccountDetailValueType> | ||
CompareAndSetAccountDetail::oldValue() const { | ||
if (compare_and_set_account_detail_.opt_old_value_case() | ||
== iroha::protocol::CompareAndSetAccountDetail:: | ||
OPT_OLD_VALUE_NOT_SET) { | ||
return boost::none; | ||
} | ||
return compare_and_set_account_detail_.old_value(); | ||
} | ||
|
||
} // namespace proto | ||
} // namespace shared_model |
Oops, something went wrong.