Skip to content

Commit

Permalink
Merge pull request #1631 from bitshares/release
Browse files Browse the repository at this point in the history
merge release to master for hotfix
  • Loading branch information
oxarbitrage authored Mar 5, 2019
2 parents 319d7b9 + 998ccb8 commit 57c40ec
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
20 changes: 19 additions & 1 deletion libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ market_ticker::market_ticker(const market_ticker_object& mto,
time = now;
base = asset_base.symbol;
quote = asset_quote.symbol;
percent_change = "0";
lowest_ask = "0";
highest_bid = "0";

fc::uint128 bv;
fc::uint128 qv;
price latest_price = asset( mto.latest_base, mto.base ) / asset( mto.latest_quote, mto.quote );
Expand Down Expand Up @@ -419,6 +423,20 @@ market_ticker::market_ticker(const market_ticker_object& mto,
if(!orders.bids.empty())
highest_bid = orders.bids[0].price;
}
market_ticker::market_ticker(const fc::time_point_sec& now,
const asset_object& asset_base,
const asset_object& asset_quote)
{
time = now;
base = asset_base.symbol;
quote = asset_quote.symbol;
latest = "0";
lowest_ask = "0";
highest_bid = "0";
percent_change = "0";
base_volume = "0";
quote_volume = "0";
}

//////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -1433,7 +1451,7 @@ market_ticker database_api_impl::get_ticker( const string& base, const string& q
return market_ticker(*itr, now, *assets[0], *assets[1], orders);
}
// if no ticker is found for this market we return an empty ticker
market_ticker empty_result;
market_ticker empty_result(now, *assets[0], *assets[1]);
return empty_result;
}

Expand Down
3 changes: 3 additions & 0 deletions libraries/app/include/graphene/app/database_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ struct market_ticker
const asset_object& asset_base,
const asset_object& asset_quote,
const order_book& orders);
market_ticker(const fc::time_point_sec& now,
const asset_object& asset_base,
const asset_object& asset_quote);
};

struct market_volume
Expand Down
2 changes: 2 additions & 0 deletions libraries/chain/db_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ bool database::_push_block(const signed_block& new_block)
*/
processed_transaction database::push_transaction( const precomputable_transaction& trx, uint32_t skip )
{ try {
// see https://github.com/bitshares/bitshares-core/issues/1573
FC_ASSERT( fc::raw::pack_size( trx ) < (1024 * 1024), "Transaction exceeds maximum transaction size." );
processed_transaction result;
detail::with_skip_flags( *this, skip, [&]()
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/include/graphene/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
#define GRAPHENE_RECENTLY_MISSED_COUNT_INCREMENT 4
#define GRAPHENE_RECENTLY_MISSED_COUNT_DECREMENT 3

#define GRAPHENE_CURRENT_DB_VERSION "BTS2.181221"
#define GRAPHENE_CURRENT_DB_VERSION "20190219"

#define GRAPHENE_IRREVERSIBLE_THRESHOLD (70 * GRAPHENE_1_PERCENT)

Expand Down

0 comments on commit 57c40ec

Please sign in to comment.