Commit 92feeec2 authored by Howo's avatar Howo Committed by Bartek Wrona

#51: Update proposal tests

parent 96254ae5
......@@ -5,7 +5,6 @@ hived.splinterlands.com:2001 #aggroed
hiveseed-se.privex.io:2001 #privex
node.mahdiyari.info:2001 #mahdiyari
rpc.ausbit.dev:2001 #ausbitbank
seed.buildteam.io:2001 #thecryptodrive
seed.chitty.me:2001 #chitty
seed.hivekings.com:2001 #drakos
seed.liondani.com:2016 #liondani
......
......@@ -15,7 +15,6 @@ const std::vector< std::string > default_seeds = {
"hiveseed-se.privex.io:2001", // privex
"node.mahdiyari.info:2001", // mahdiyari
"rpc.ausbit.dev:2001", // ausbitbank
"seed.buildteam.io:2001", // thecryptodrive
"seed.chitty.me:2001", // chitty
"seed.hivekings.com:2001", // drakos
"seed.liondani.com:2016", // liondani
......
......@@ -998,9 +998,7 @@ int64_t sps_proposal_database_fixture::create_proposal( std::string creator, std
return itr->proposal_id;
}
void sps_proposal_database_fixture::update_proposal(uint64_t proposal_id, std::string creator,
asset daily_pay, std::string subject, std::string permlink,
const fc::ecc::private_key& key )
void sps_proposal_database_fixture::update_proposal(uint64_t proposal_id, std::string creator, asset daily_pay, std::string subject, std::string permlink, const fc::ecc::private_key& key)
{
signed_transaction tx;
update_proposal_operation op;
......@@ -1068,9 +1066,9 @@ void sps_proposal_database_fixture::remove_proposal(account_name_type _deleter,
bool sps_proposal_database_fixture::find_vote_for_proposal(const std::string& _user, int64_t _proposal_id)
{
const auto& proposal_vote_idx = db->get_index< proposal_vote_index >().indices(). template get< by_voter_proposal >();
auto found_vote = proposal_vote_idx.find( boost::make_tuple(_user, _proposal_id ) );
return found_vote != proposal_vote_idx.end();
const auto& proposal_vote_idx = db->get_index< proposal_vote_index >().indices(). template get< by_voter_proposal >();
auto found_vote = proposal_vote_idx.find( boost::make_tuple(_user, _proposal_id ) );
return found_vote != proposal_vote_idx.end();
}
uint64_t sps_proposal_database_fixture::get_nr_blocks_until_maintenance_block()
......
......@@ -359,10 +359,6 @@ struct sps_proposal_database_fixture : public virtual clean_database_fixture
int64_t create_proposal( std::string creator, std::string receiver,
time_point_sec start_date, time_point_sec end_date,
asset daily_pay, const fc::ecc::private_key& key );
void update_proposal( uint64_t proposal_id, std::string creator,
asset daily_pay, std::string subject, std::string permlink,
const fc::ecc::private_key& key );
void vote_proposal( std::string voter, const std::vector< int64_t >& id_proposals, bool approve, const fc::ecc::private_key& key );
......@@ -371,14 +367,15 @@ struct sps_proposal_database_fixture : public virtual clean_database_fixture
void remove_proposal(account_name_type _deleter, flat_set<int64_t> _proposal_id, const fc::ecc::private_key& _key);
bool find_vote_for_proposal(const std::string& _user, int64_t _proposal_id);
void update_proposal(uint64_t proposal_id, std::string creator, asset daily_pay, std::string subject, std::string permlink, const fc::ecc::private_key& key );
bool find_vote_for_proposal(const std::string& _user, int64_t _proposal_id);
uint64_t get_nr_blocks_until_maintenance_block();
uint64_t get_nr_blocks_until_daily_maintenance_block();
void post_comment( std::string _authro, std::string _permlink, std::string _title, std::string _body, std::string _parent_permlink, const fc::ecc::private_key& _key);
struct create_proposal_data
struct create_proposal_data
{
std::string creator ;
std::string receiver ;
......@@ -388,7 +385,7 @@ struct sps_proposal_database_fixture : public virtual clean_database_fixture
std::string subject ;
std::string url ;
create_proposal_data(fc::time_point_sec _start)
create_proposal_data(fc::time_point_sec _start)
{
creator = "alice";
receiver = "bob";
......
This diff is collapsed.
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