Commit c67c8668 authored by Bartek Wrona's avatar Bartek Wrona

Merge branch 'ninja_mine_to_dao_0_23_rebase' of...

Merge branch 'ninja_mine_to_dao_0_23_rebase' of gitlab.syncad.com:hive-group/steem into ninja_mine_to_dao_0_23_rebase
parents d01fc9d1 60e81a3d
This diff is collapsed.
......@@ -518,6 +518,11 @@ namespace steem { namespace chain {
///@}
#endif
//Clears all pending operations on account that involve balance, moves tokens to STEEM_TREASURY_ACCOUNT
void clear_account( const account_object& account,
asset* transferred_sbd_ptr = nullptr, asset* transferred_steem_ptr = nullptr,
asset* converted_vests_ptr = nullptr, asset* steem_from_vests_ptr = nullptr );
protected:
//Mark pop_undo() as protected -- we do not want outside calling pop_undo(); it should call pop_block() instead
//void pop_undo() { object_database::pop_undo(); }
......
......@@ -367,6 +367,14 @@ struct sps_proposal_database_fixture_performance : public sps_proposal_database_
}
};
struct hf23_database_fixture : public clean_database_fixture
{
hf23_database_fixture( uint16_t shared_file_size_in_mb = 8 )
: clean_database_fixture( shared_file_size_in_mb ){}
virtual ~hf23_database_fixture(){}
};
struct json_rpc_database_fixture : public database_fixture
{
private:
......
#include <boost/test/unit_test.hpp>
#include <steem/chain/steem_fwd.hpp>
#include <steem/protocol/exceptions.hpp>
#include <steem/protocol/hardfork.hpp>
#include <steem/protocol/sps_operations.hpp>
#include <steem/chain/database.hpp>
#include <steem/chain/database_exceptions.hpp>
#include <steem/chain/steem_objects.hpp>
#include <steem/chain/util/reward.hpp>
#include <steem/plugins/rc/rc_objects.hpp>
#include <steem/plugins/rc/resource_count.hpp>
#include <fc/macros.hpp>
#include <fc/crypto/digest.hpp>
#include "../db_fixture/database_fixture.hpp"
#include <cmath>
#include <iostream>
#include <stdexcept>
using namespace steem;
using namespace steem::chain;
using namespace steem::protocol;
using fc::string;
BOOST_FIXTURE_TEST_SUITE( hf23_tests, hf23_database_fixture )
BOOST_AUTO_TEST_CASE( basic_test_01 )
{
try
{
BOOST_TEST_MESSAGE( "Calling clear_account" );
ACTORS( (alice) )
generate_block();
auto _alice = db->get_account( "alice" );
db->clear_account( _alice );
validate_database();
}
FC_LOG_AND_RETHROW()
}
BOOST_AUTO_TEST_SUITE_END()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment