Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1177 from hyperledger/master
Browse files Browse the repository at this point in the history
Merge master hotfixes to develop

Signed-off-by: Andrei Lebedev <[email protected]>
  • Loading branch information
lebdron authored Apr 3, 2018
2 parents 76d5ec2 + 9e0e190 commit d5d7738
Show file tree
Hide file tree
Showing 33 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion iroha-cli/interactive/impl/interactive_transaction_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "model/converters/json_transaction_factory.hpp"
#include "model/converters/pb_common.hpp"
#include "model/model_crypto_provider.hpp" // for ModelCryptoProvider
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "model/sha3_hash.hpp"
#include "parser/parser.hpp" // for parser::ParseValue

Expand Down
2 changes: 1 addition & 1 deletion irohad/ametsuchi/impl/mutable_storage_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace iroha {
function) {
auto execute_transaction = [this](auto &transaction) {
command_executor_->setCreatorAccountId(transaction->creatorAccountId());
auto execute_command = [this, &transaction](auto command) {
auto execute_command = [this](auto command) {
auto result =
boost::apply_visitor(*command_executor_, command->get());
return result.match([](expected::Value<void> &v) { return true; },
Expand Down
6 changes: 3 additions & 3 deletions irohad/ametsuchi/impl/postgres_block_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace iroha {
shared_model::proto::from_old(block_old));
};
return rxcpp::observable<>::create<PostgresBlockQuery::wBlock>(
[this, block{std::move(block)}](auto s) {
[block{std::move(block)}](auto s) {
if (block) {
s.on_next(block);
}
Expand Down Expand Up @@ -120,7 +120,7 @@ namespace iroha {
*model::converters::stringToJson(bytesToString(bytes)))));
};
boost::for_each(
result | boost::adaptors::transformed([&block](const auto &x) {
result | boost::adaptors::transformed([](const auto &x) {
return x.at("index").template as<size_t>();
}),
[&](auto x) {
Expand Down Expand Up @@ -198,7 +198,7 @@ namespace iroha {
const shared_model::crypto::Hash &hash) {
return getBlockId(hash) |
[this](auto blockId) { return block_store_.get(blockId); } |
[this](auto bytes) {
[](auto bytes) {
// TODO IR-975 victordrobny 12.02.2018 convert directly to
// shared_model::proto::Block after FlatFile will be reworked to new
// model
Expand Down
2 changes: 2 additions & 0 deletions irohad/ametsuchi/ordering_service_persistent_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ namespace iroha {
* Reset storage to default state
*/
virtual bool resetState() = 0;

virtual ~OrderingServicePersistentState() = default;
};
} // namespace ametsuchi
} // namespace iroha
Expand Down
2 changes: 1 addition & 1 deletion irohad/execution/impl/command_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "execution/common_executor.hpp"
#include "interfaces/commands/command.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "utils/amount_utils.hpp"

namespace iroha {
Expand Down
2 changes: 1 addition & 1 deletion irohad/model/converters/pb_command_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "model/commands/set_quorum.hpp"
#include "model/commands/subtract_asset_quantity.hpp"
#include "model/commands/transfer_asset.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

namespace iroha {
namespace model {
Expand Down
2 changes: 1 addition & 1 deletion irohad/model/generators/impl/command_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "model/commands/set_quorum.hpp"
#include "model/commands/subtract_asset_quantity.hpp"
#include "model/commands/transfer_asset.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

using namespace generator;

Expand Down
2 changes: 1 addition & 1 deletion irohad/model/impl/query_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <boost/algorithm/string.hpp>

#include "execution/common_executor.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

using namespace iroha::model;
using namespace iroha::ametsuchi;
Expand Down
2 changes: 1 addition & 1 deletion irohad/network/impl/block_loader_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ rxcpp::observable<std::shared_ptr<Block>> BlockLoaderImpl::retrieveBlocks(
.build(block)
.match(
// success case
[this, &context, &subscriber](
[&subscriber](
const iroha::expected::Value<shared_model::proto::Block>
&result) {
subscriber.on_next(
Expand Down
2 changes: 1 addition & 1 deletion shared_model/validators/field_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "validators/field_validator.hpp"
#include <boost/algorithm/string_regex.hpp>
#include <boost/format.hpp>
#include "model/permissions.hpp"
#include "permissions.hpp"
#include "cryptography/crypto_provider/crypto_verifier.hpp"

// TODO: 15.02.18 nickaleks Change structure to compositional IR-978
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "datetime/time.hpp"
// TODO (@l4l) IR-874 create more comfort way for permssion-dependent proto
// building
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

using namespace shared_model::crypto;
using namespace std::literals::string_literals;
Expand Down
2 changes: 1 addition & 1 deletion test/framework/test_block_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "model/commands/create_account.hpp"
#include "model/commands/create_asset.hpp"
#include "model/commands/create_domain.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "model/sha3_hash.hpp"

using namespace iroha;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/add_asset_qty_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "datetime/time.hpp"
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"

using namespace std::string_literals;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/create_account_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "datetime/time.hpp"
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"

using namespace std::string_literals;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/create_domain_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "datetime/time.hpp"
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"

using namespace std::string_literals;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/create_role_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "datetime/time.hpp"
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"

using namespace std::string_literals;
Expand Down
4 changes: 2 additions & 2 deletions test/integration/acceptance/get_transactions_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "interfaces/utils/specified_visitor.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "utils/query_error_response_visitor.hpp"

using namespace std::string_literals;
Expand Down Expand Up @@ -169,7 +169,7 @@ TEST_F(GetTransactions, HaveGetMyTx) {
*/
TEST_F(GetTransactions, InvalidSignatures) {
auto dummy_tx = dummyTx();
auto check = [&dummy_tx](auto &status) {
auto check = [](auto &status) {
auto resp = boost::get<shared_model::detail::PolymorphicWrapper<
interface::ErrorQueryResponse>>(status.get());
ASSERT_NO_THROW(boost::get<shared_model::detail::PolymorphicWrapper<
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/subtract_asset_qty_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "datetime/time.hpp"
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"

using namespace std::string_literals;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/acceptance/transfer_asset_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "framework/base_tx.hpp"
#include "framework/integration_framework/integration_test_framework.hpp"
#include "interfaces/utils/specified_visitor.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"
#include "utils/query_error_response_visitor.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/integration/client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "model/converters/json_query_factory.hpp"
#include "model/converters/json_transaction_factory.hpp"
#include "model/converters/pb_transaction_factory.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

#include "builders/protobuf/queries.hpp"
#include "builders/protobuf/transaction.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/ametsuchi/ametsuchi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "ametsuchi/mutable_storage.hpp"
#include "builders/protobuf/transaction.hpp"
#include "framework/test_subscriber.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/irohad/ametsuchi/ametsuchi_fixture.hpp"
#include "module/shared_model/builders/protobuf/test_block_builder.hpp"
#include "module/shared_model/builders/protobuf/test_transaction_builder.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/ametsuchi/kv_storage_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "ametsuchi/impl/storage_impl.hpp"
#include "ametsuchi/mutable_storage.hpp"
#include "model/block.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "model/sha3_hash.hpp"
#include "module/irohad/ametsuchi/ametsuchi_fixture.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/model/command_validate_execute_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "model/commands/set_quorum.hpp"
#include "model/commands/subtract_asset_quantity.hpp"
#include "model/commands/transfer_asset.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/irohad/ametsuchi/ametsuchi_mocks.hpp"

using ::testing::AllOf;
Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/model/converters/json_commands_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "model/commands/subtract_asset_quantity.hpp"
#include "model/commands/transfer_asset.hpp"
#include "model/converters/json_command_factory.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "model/sha3_hash.hpp"

using namespace rapidjson;
Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/model/converters/pb_commands_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "model/commands/transfer_asset.hpp"

#include "model/converters/pb_command_factory.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"

using namespace iroha::model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/irohad/ametsuchi/ametsuchi_mocks.hpp"
#include "module/irohad/validation/validation_mocks.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/torii/torii_queries_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
#include "model/converters/pb_common.hpp"

#include "main/server_runner.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "torii/processor/query_processor_impl.hpp"
#include "torii/query_client.hpp"
#include "torii/query_service.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/module/irohad/validation/query_execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "builders/protobuf/common_objects/proto_amount_builder.hpp"
#include "builders/protobuf/common_objects/proto_asset_builder.hpp"
#include "framework/test_subscriber.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "model/query_execution.hpp"
#include "module/shared_model/builders/protobuf/test_query_builder.hpp"

Expand Down
1 change: 1 addition & 0 deletions test/module/libs/common/result_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Base {
virtual int getNumber() {
return 0;
}
virtual ~Base() = default;
};

class Derived : public Base {
Expand Down
5 changes: 3 additions & 2 deletions test/module/shared_model/cryptography/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ target_link_libraries(blob_test

addtest(crypto_usage_test crypto_usage_test.cpp)
target_link_libraries(crypto_usage_test
shared_model_proto_builders
shared_model_cryptography
model
model_generators
schema
iroha_amount
)
3 changes: 1 addition & 2 deletions test/module/shared_model/cryptography/crypto_usage_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class CryptoUsageTest : public ::testing::Test {
and std::all_of(
signable.signatures().begin(),
signable.signatures().end(),
[this,
&signable](const shared_model::detail::PolymorphicWrapper<
[&signable](const shared_model::detail::PolymorphicWrapper<
shared_model::interface::Signature> &signature) {
return shared_model::crypto::CryptoVerifier<>::verify(
signature->signedData(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "backend/protobuf/common_objects/peer.hpp"
#include "builders/protobuf/queries.hpp"
#include "builders/protobuf/transaction.hpp"
#include "model/permissions.hpp"
#include "validators/permissions.hpp"
#include "module/shared_model/validators/validators_fixture.hpp"
#include "utils/lazy_initializer.hpp"
#include "validators/field_validator.hpp"
Expand Down

0 comments on commit d5d7738

Please sign in to comment.