Skip to content

Commit c22b3c5

Browse files
Merge from eos/master
2 parents e3ea0a3 + 60c8bac commit c22b3c5

File tree

7 files changed

+42
-23
lines changed

7 files changed

+42
-23
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ elseif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
5959
endif()
6060

6161

62+
if (UNIX)
63+
if (APPLE)
64+
if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
65+
set(LLVM_DIR "/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm")
66+
endif()
67+
endif()
68+
endif()
69+
6270
include( GNUInstallDirs )
6371
include( VersionMacros )
6472
include( SetupTargetMacros )
@@ -72,7 +80,7 @@ set( CXX_STANDARD_REQUIRED ON)
7280

7381
set(VERSION_MAJOR 1)
7482
set(VERSION_MINOR 4)
75-
set(VERSION_PATCH 1)
83+
set(VERSION_PATCH 2)
7684

7785
set( CLI_CLIENT_EXECUTABLE_NAME cleos )
7886
set( NODE_EXECUTABLE_NAME nodeos )

Docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ cd eos/Docker
2020
docker build . -t eosio/eos
2121
```
2222

23-
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.4.1 tag, you could do the following:
23+
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.4.2 tag, you could do the following:
2424

2525
```bash
26-
docker build -t eosio/eos:v1.4.1 --build-arg branch=v1.4.1 .
26+
docker build -t eosio/eos:v1.4.2 --build-arg branch=v1.4.2 .
2727
```
2828

2929
By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.

libraries/chain/controller.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct controller_impl {
253253
bool append_to_blog = false;
254254
if (!log_head) {
255255
if (s->block) {
256-
EOS_ASSERT(s->block_num == blog.first_block_num(), block_log_exception, "block log has no blocks and is appending the wrong first block. Expected ${expecgted}, but received: ${actual}",
256+
EOS_ASSERT(s->block_num == blog.first_block_num(), block_log_exception, "block log has no blocks and is appending the wrong first block. Expected ${expected}, but received: ${actual}",
257257
("expected", blog.first_block_num())("actual", s->block_num));
258258
append_to_blog = true;
259259
} else {
@@ -395,7 +395,10 @@ struct controller_impl {
395395
db.undo();
396396
}
397397

398-
ilog( "database initialized with hash: ${hash}", ("hash", calculate_integrity_hash()));
398+
if( snapshot ) {
399+
const auto hash = calculate_integrity_hash();
400+
ilog( "database initialized with hash: ${hash}", ("hash", hash) );
401+
}
399402

400403
}
401404

libraries/fc

Submodule fc updated 1 file

plugins/mongo_db_plugin/mongo_db_plugin.cpp

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class mongo_db_plugin_impl {
9898

9999
bool add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::action_trace& atrace,
100100
const chain::transaction_trace_ptr& t,
101-
bool executed, const std::chrono::milliseconds& now );
101+
bool executed, const std::chrono::milliseconds& now,
102+
bool& write_ttrace );
102103

103104
void update_account(const chain::action& act);
104105

@@ -799,7 +800,8 @@ void mongo_db_plugin_impl::_process_accepted_transaction( const chain::transacti
799800
bool
800801
mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::action_trace& atrace,
801802
const chain::transaction_trace_ptr& t,
802-
bool executed, const std::chrono::milliseconds& now )
803+
bool executed, const std::chrono::milliseconds& now,
804+
bool& write_ttrace )
803805
{
804806
using namespace bsoncxx::types;
805807
using bsoncxx::builder::basic::kvp;
@@ -809,8 +811,10 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces
809811
}
810812

811813
bool added = false;
812-
if( start_block_reached && store_action_traces &&
813-
filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization ) ) {
814+
const bool in_filter = (store_action_traces || store_transaction_traces) && start_block_reached &&
815+
filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization );
816+
write_ttrace |= in_filter;
817+
if( start_block_reached && store_action_traces && in_filter ) {
814818
auto action_traces_doc = bsoncxx::builder::basic::document{};
815819
const chain::base_action_trace& base = atrace; // without inline action traces
816820

@@ -841,7 +845,7 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces
841845
}
842846

843847
for( const auto& iline_atrace : atrace.inline_traces ) {
844-
added |= add_action_trace( bulk_action_traces, iline_atrace, t, executed, now );
848+
added |= add_action_trace( bulk_action_traces, iline_atrace, t, executed, now, write_ttrace );
845849
}
846850

847851
return added;
@@ -861,22 +865,22 @@ void mongo_db_plugin_impl::_process_applied_transaction( const chain::transactio
861865
bulk_opts.ordered(false);
862866
mongocxx::bulk_write bulk_action_traces = _action_traces.create_bulk_write(bulk_opts);
863867
bool write_atraces = false;
868+
bool write_ttrace = false; // filters apply to transaction_traces as well
864869
bool executed = t->receipt.valid() && t->receipt->status == chain::transaction_receipt_header::executed;
865870

866871
for( const auto& atrace : t->action_traces ) {
867872
try {
868-
write_atraces |= add_action_trace( bulk_action_traces, atrace, t, executed, now );
873+
write_atraces |= add_action_trace( bulk_action_traces, atrace, t, executed, now, write_ttrace );
869874
} catch(...) {
870875
handle_mongo_exception("add action traces", __LINE__);
871876
}
872877
}
873878

874879
if( !start_block_reached ) return; //< add_action_trace calls update_account which must be called always
875-
if( !write_atraces ) return; //< do not insert transaction_trace if all action_traces filtered out
876880

877881
// transaction trace insert
878882

879-
if( store_transaction_traces ) {
883+
if( store_transaction_traces && write_ttrace ) {
880884
try {
881885
auto v = to_variant_with_abi( *t );
882886
string json = fc::json::to_string( v );
@@ -909,13 +913,15 @@ void mongo_db_plugin_impl::_process_applied_transaction( const chain::transactio
909913
}
910914

911915
// insert action_traces
912-
try {
913-
if( !bulk_action_traces.execute() ) {
914-
EOS_ASSERT( false, chain::mongo_db_insert_fail,
915-
"Bulk action traces insert failed for transaction trace: ${id}", ("id", t->id) );
916+
if( write_atraces ) {
917+
try {
918+
if( !bulk_action_traces.execute() ) {
919+
EOS_ASSERT( false, chain::mongo_db_insert_fail,
920+
"Bulk action traces insert failed for transaction trace: ${id}", ("id", t->id) );
921+
}
922+
} catch( ... ) {
923+
handle_mongo_exception( "action traces insert", __LINE__ );
916924
}
917-
} catch( ... ) {
918-
handle_mongo_exception( "action traces insert", __LINE__ );
919925
}
920926

921927
}

programs/cleos/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,7 @@ int eos_main( int argc, char** argv ) {
24002400
send_actions(std::move(actions), 10000, packed_transaction::zlib);
24012401
}
24022402
} else {
2403-
std::cout << "Skipping set code because the new code is the same as the existing code" << std::endl;
2403+
std::cerr << localized("Skipping set code because the new code is the same as the existing code") << std::endl;
24042404
}
24052405
};
24062406

@@ -2449,7 +2449,7 @@ int eos_main( int argc, char** argv ) {
24492449
send_actions(std::move(actions), 10000, packed_transaction::zlib);
24502450
}
24512451
} else {
2452-
std::cout << "Skipping set abi because the new abi is the same as the existing abi" << std::endl;
2452+
std::cerr << localized("Skipping set abi because the new abi is the same as the existing abi") << std::endl;
24532453
}
24542454
};
24552455

scripts/eosio_build_darwin.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@
160160
printf "\\tExiting now.\\n\\n"
161161
exit 1;
162162
fi
163-
if ! "${BREW}" unlink {DEP} && "${BREW}" link --force ${DEP}
163+
if [[ "$DEP" == "llvm@4" ]]; then
164+
"${BREW}" unlink ${DEP}
165+
elif ! "${BREW}" unlink ${DEP} && "${BREW}" link --force ${DEP}
164166
then
165167
printf "\\tHomebrew exited with the above errors.\\n"
166168
printf "\\tExiting now.\\n\\n"

0 commit comments

Comments
 (0)