Skip to content

Commit

Permalink
Merge pull request #839 from steemit/steem-v0.16.3
Browse files Browse the repository at this point in the history
Steem v0.16.3
  • Loading branch information
Michael Vandeberg authored Feb 2, 2017
2 parents 2090031 + f1cb3dc commit e21a808
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,14 +939,14 @@ void application::set_program_options(boost::program_options::options_descriptio
("enable-plugin", bpo::value< vector<string> >()->composing()->default_value(default_plugins, str_default_plugins), "Plugin(s) to enable, may be specified multiple times")
("max-block-age", bpo::value< int32_t >()->default_value(200), "Maximum age of head block when broadcasting tx via API")
("flush", bpo::value< uint32_t >()->default_value(100000), "Flush shared memory file to disk this many blocks")
("check-locks", bpo::value< bool >()->default_value(false), "Check correctness of chainbase locking")
;
command_line_options.add(configuration_file_options);
command_line_options.add_options()
("replay-blockchain", "Rebuild object graph by replaying all blocks")
("resync-blockchain", "Delete all blocks and re-sync with network from scratch")
("force-validate", "Force validation of all transactions")
("read-only", "Node will not connect to p2p network and can only read from the chain state" )
("check-locks", "Check correctness of chainbase locking")
;
command_line_options.add(_cli_options);
configuration_file_options.add(_cfg_options);
Expand Down
3 changes: 3 additions & 0 deletions libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,9 @@ discussion database_api::get_discussion( comment_id_type id, uint32_t truncate_b
d.body_length = d.body.size();
if( truncate_body ) {
d.body = d.body.substr( 0, truncate_body );

if( !fc::is_utf8( d.body ) )
d.body = fc::prune_invalid_utf8( d.body );
}
return d;
}
Expand Down
5 changes: 4 additions & 1 deletion libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ void database::open( const fc::path& data_dir, const fc::path& shared_mem_dir, u
}
}

init_hardforks();
with_read_lock( [&]()
{
init_hardforks(); // Writes to local state, but reads from db
});
}
FC_CAPTURE_LOG_AND_RETHROW( (data_dir)(shared_mem_dir)(shared_file_size) )
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
2 changes: 1 addition & 1 deletion libraries/protocol/include/steemit/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
#pragma once

#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 16, 2) )
#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 16, 3) )
#define STEEMIT_BLOCKCHAIN_HARDFORK_VERSION ( hardfork_version( STEEMIT_BLOCKCHAIN_VERSION ) )

#ifdef IS_TEST_NET
Expand Down
5 changes: 4 additions & 1 deletion programs/steemd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ int main(int argc, char** argv) {
exit_promise->set_value(signal);
}, SIGTERM);

ilog("Started witness node on a chain with ${h} blocks.", ("h", node->chain_database()->head_block_num()));
node->chain_database()->with_read_lock( [&]()
{
ilog("Started witness node on a chain with ${h} blocks.", ("h", node->chain_database()->head_block_num()));
});

exit_promise->wait();
node->shutdown_plugins();
Expand Down
12 changes: 6 additions & 6 deletions tests/tests/operation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3614,7 +3614,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce2 = nonce;
idump( (nonce2) );
#else
uint64_t nonce2 = 91;
uint64_t nonce2 = 36;
#endif

#ifdef CALCULATE_NONCES
Expand All @@ -3627,7 +3627,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce3 = nonce;
idump( (nonce3) );
#else
uint64_t nonce3 = 162;
uint64_t nonce3 = 357;
#endif

#ifdef CALCULATE_NONCES
Expand All @@ -3640,7 +3640,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce4 = nonce;
idump( (nonce4) );
#else
uint64_t nonce4 = 184;
uint64_t nonce4 = 394;
#endif

// Test with nonce that doesn't match work, should fail
Expand Down Expand Up @@ -3734,7 +3734,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce5 = nonce;
idump( (nonce5) );
#else
uint32_t nonce5 = 364;
uint32_t nonce5 = 404;
#endif

BOOST_TEST_MESSAGE( "Submit pow from existing account without witness object." );
Expand Down Expand Up @@ -3778,7 +3778,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce6 = nonce;
idump( (nonce6) );
#else
uint64_t nonce6 = 387;
uint64_t nonce6 = 460;
#endif

#ifdef CALCULATE_NONCES
Expand All @@ -3791,7 +3791,7 @@ BOOST_AUTO_TEST_CASE( pow2_op )
uint64_t nonce7 = nonce;
idump( (nonce7) );
#else
uint64_t nonce7 = 408;
uint64_t nonce7 = 496;
#endif

// Test with wrong previous block id
Expand Down

0 comments on commit e21a808

Please sign in to comment.