Skip to content

Commit

Permalink
Merge pull request #2170 from bitshares/fix-badge
Browse files Browse the repository at this point in the history
Fix badge
  • Loading branch information
abitmore authored May 8, 2020
2 parents 26d0fc1 + 1b03328 commit b68a791
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BitShares Core
`master` | `develop` | `hardfork` | `testnet` | `bitshares-fc`
--- | --- | --- | --- | ---
[![](https://travis-ci.org/bitshares/bitshares-core.svg?branch=master)](https://travis-ci.org/bitshares/bitshares-core) | [![](https://travis-ci.org/bitshares/bitshares-core.svg?branch=develop)](https://travis-ci.org/bitshares/bitshares-core) | [![](https://travis-ci.org/bitshares/bitshares-core.svg?branch=hardfork)](https://travis-ci.org/bitshares/bitshares-core) | [![](https://travis-ci.org/bitshares/bitshares-core.svg?branch=testnet)](https://travis-ci.org/bitshares/bitshares-core) | [![](https://travis-ci.org/bitshares/bitshares-fc.svg?branch=master)](https://travis-ci.org/bitshares/bitshares-fc)
[![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=master)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Amaster) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=develop)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Adevelop) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=hardfork)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Ahardfork) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=testnet)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Atestnet) | [https://github.com/bitshares/bitshares-fc/workflows/Github%20Autobuild/badge.svg?branch=master](https://github.com/bitshares/bitshares-fc/actions?query=branch%3Amaster)
[![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=master)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Amaster) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=develop)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Adevelop) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=hardfork)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Ahardfork) | [![](https://github.com/bitshares/bitshares-core/workflows/Github%20Autobuild/badge.svg?branch=testnet)](https://github.com/bitshares/bitshares-core/actions?query=branch%3Atestnet) | [![](https://github.com/bitshares/bitshares-fc/workflows/Github%20Autobuild/badge.svg?branch=master)](https://github.com/bitshares/bitshares-fc/actions?query=branch%3Amaster)

* [Getting Started](#getting-started)
* [Support](#support)
Expand Down
23 changes: 17 additions & 6 deletions tests/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ BOOST_AUTO_TEST_CASE( two_node_network )
BOOST_TEST_MESSAGE( "Starting app1 and waiting 500 ms" );
app1.startup();
#ifdef NDEBUG
#define LISTEN_WAIT_TIME (fc::milliseconds(10000))
#else
#define LISTEN_WAIT_TIME (fc::milliseconds(30000))
#else
#define LISTEN_WAIT_TIME (fc::milliseconds(120000))
#endif
fc::wait_for( LISTEN_WAIT_TIME, [&app1] () {
const auto status = app1.p2p_node()->network_get_info();
Expand Down Expand Up @@ -327,11 +327,13 @@ BOOST_AUTO_TEST_CASE( two_node_network )
app1.p2p_node()->broadcast(graphene::net::trx_message(trx));

#ifdef NDEBUG
#define BROADCAST_WAIT_TIME (fc::milliseconds(5000))
#else
#define BROADCAST_WAIT_TIME (fc::milliseconds(15000))
#else
#define BROADCAST_WAIT_TIME (fc::milliseconds(60000))
#endif
fc::usleep( BROADCAST_WAIT_TIME );
fc::wait_for( BROADCAST_WAIT_TIME, [db2] () {
return db2->get_balance( GRAPHENE_NULL_ACCOUNT, asset_id_type() ).amount.value == 1000000;
});

BOOST_CHECK_EQUAL( db1->get_balance( GRAPHENE_NULL_ACCOUNT, asset_id_type() ).amount.value, 1000000 );
BOOST_CHECK_EQUAL( db2->get_balance( GRAPHENE_NULL_ACCOUNT, asset_id_type() ).amount.value, 1000000 );
Expand All @@ -345,16 +347,25 @@ BOOST_AUTO_TEST_CASE( two_node_network )
committee_key,
database::skip_nothing);

BOOST_CHECK_EQUAL( db1->head_block_num(), 0u );
BOOST_CHECK_EQUAL( db2->head_block_num(), 1u );
BOOST_CHECK_EQUAL( block_1.block_num(), 1u );

BOOST_TEST_MESSAGE( "Broadcasting block" );
app2.p2p_node()->broadcast(graphene::net::block_message( block_1 ));

fc::usleep( BROADCAST_WAIT_TIME );
fc::wait_for( BROADCAST_WAIT_TIME, [db1] () {
return db1->head_block_num() == 1;
});

BOOST_TEST_MESSAGE( "Verifying nodes are still connected" );
BOOST_CHECK_EQUAL(app1.p2p_node()->get_connection_count(), 1u);
BOOST_CHECK_EQUAL(app1.chain_database()->head_block_num(), 1u);

BOOST_TEST_MESSAGE( "Checking GRAPHENE_NULL_ACCOUNT has balance" );
BOOST_CHECK_EQUAL( db1->get_balance( GRAPHENE_NULL_ACCOUNT, asset_id_type() ).amount.value, 1000000 );
BOOST_CHECK_EQUAL( db2->get_balance( GRAPHENE_NULL_ACCOUNT, asset_id_type() ).amount.value, 1000000 );

} catch( fc::exception& e ) {
edump((e.to_detail_string()));
throw;
Expand Down

0 comments on commit b68a791

Please sign in to comment.