Merge branch graphene/develop into bitshares at commit '1b8ce8a'
Conflicts: libraries/chain/include/graphene/chain/hardfork.hpp
This commit is contained in:
commit
50c06e7e64
4 changed files with 72 additions and 22 deletions
|
|
@ -136,21 +136,6 @@ void account_statistics_object::pay_fee( share_type core_fee, share_type cashbac
|
|||
pending_vested_fees += core_fee;
|
||||
}
|
||||
|
||||
void account_object::options_type::validate() const
|
||||
{
|
||||
auto needed_witnesses = num_witness;
|
||||
auto needed_committee = num_committee;
|
||||
|
||||
for( vote_id_type id : votes )
|
||||
if( id.type() == vote_id_type::witness && needed_witnesses )
|
||||
--needed_witnesses;
|
||||
else if ( id.type() == vote_id_type::committee && needed_committee )
|
||||
--needed_committee;
|
||||
|
||||
FC_ASSERT( needed_witnesses == 0 && needed_committee == 0,
|
||||
"May not specify fewer witnesses or committee members than the number voted for.");
|
||||
}
|
||||
|
||||
set<account_id_type> account_member_index::get_account_members(const account_object& a)const
|
||||
{
|
||||
set<account_id_type> result;
|
||||
|
|
|
|||
|
|
@ -158,6 +158,21 @@ bool is_cheap_name( const string& n )
|
|||
return false;
|
||||
}
|
||||
|
||||
void account_options::validate() const
|
||||
{
|
||||
auto needed_witnesses = num_witness;
|
||||
auto needed_committee = num_committee;
|
||||
|
||||
for( vote_id_type id : votes )
|
||||
if( id.type() == vote_id_type::witness && needed_witnesses )
|
||||
--needed_witnesses;
|
||||
else if ( id.type() == vote_id_type::committee && needed_committee )
|
||||
--needed_committee;
|
||||
|
||||
FC_ASSERT( needed_witnesses == 0 && needed_committee == 0,
|
||||
"May not specify fewer witnesses or committee members than the number voted for.");
|
||||
}
|
||||
|
||||
share_type account_create_operation::calculate_fee( const fee_parameters_type& k )const
|
||||
{
|
||||
auto core_fee_required = k.basic_fee;
|
||||
|
|
|
|||
|
|
@ -447,9 +447,21 @@ class wallet_api
|
|||
/**
|
||||
* @ingroup Transaction Builder API
|
||||
*/
|
||||
signed_transaction propose_builder_transaction(transaction_handle_type handle,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0, bool broadcast = true);
|
||||
signed_transaction propose_builder_transaction(
|
||||
transaction_handle_type handle,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0,
|
||||
bool broadcast = true
|
||||
);
|
||||
|
||||
signed_transaction propose_builder_transaction2(
|
||||
transaction_handle_type handle,
|
||||
string account_name_or_id,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0,
|
||||
bool broadcast = true
|
||||
);
|
||||
|
||||
/**
|
||||
* @ingroup Transaction Builder API
|
||||
*/
|
||||
|
|
@ -1483,6 +1495,7 @@ FC_API( graphene::wallet::wallet_api,
|
|||
(preview_builder_transaction)
|
||||
(sign_builder_transaction)
|
||||
(propose_builder_transaction)
|
||||
(propose_builder_transaction2)
|
||||
(remove_builder_transaction)
|
||||
(is_new)
|
||||
(is_locked)
|
||||
|
|
|
|||
|
|
@ -862,9 +862,10 @@ public:
|
|||
|
||||
return _builder_transactions[transaction_handle] = sign_transaction(_builder_transactions[transaction_handle], broadcast);
|
||||
}
|
||||
signed_transaction propose_builder_transaction(transaction_handle_type handle,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0, bool broadcast = true)
|
||||
signed_transaction propose_builder_transaction(
|
||||
transaction_handle_type handle,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0, bool broadcast = true)
|
||||
{
|
||||
FC_ASSERT(_builder_transactions.count(handle));
|
||||
proposal_create_operation op;
|
||||
|
|
@ -879,6 +880,28 @@ public:
|
|||
|
||||
return trx = sign_transaction(trx, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction propose_builder_transaction2(
|
||||
transaction_handle_type handle,
|
||||
string account_name_or_id,
|
||||
time_point_sec expiration = time_point::now() + fc::minutes(1),
|
||||
uint32_t review_period_seconds = 0, bool broadcast = true)
|
||||
{
|
||||
FC_ASSERT(_builder_transactions.count(handle));
|
||||
proposal_create_operation op;
|
||||
op.fee_paying_account = get_account(account_name_or_id).get_id();
|
||||
op.expiration_time = expiration;
|
||||
signed_transaction& trx = _builder_transactions[handle];
|
||||
std::transform(trx.operations.begin(), trx.operations.end(), std::back_inserter(op.proposed_ops),
|
||||
[](const operation& op) -> op_wrapper { return op; });
|
||||
if( review_period_seconds )
|
||||
op.review_period_seconds = review_period_seconds;
|
||||
trx.operations = {op};
|
||||
_remote_db->get_global_properties().parameters.current_fees->set_fee( trx.operations.front() );
|
||||
|
||||
return trx = sign_transaction(trx, broadcast);
|
||||
}
|
||||
|
||||
void remove_builder_transaction(transaction_handle_type handle)
|
||||
{
|
||||
_builder_transactions.erase(handle);
|
||||
|
|
@ -2726,11 +2749,25 @@ signed_transaction wallet_api::sign_builder_transaction(transaction_handle_type
|
|||
return my->sign_builder_transaction(transaction_handle, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::propose_builder_transaction(transaction_handle_type handle, time_point_sec expiration, uint32_t review_period_seconds, bool broadcast)
|
||||
signed_transaction wallet_api::propose_builder_transaction(
|
||||
transaction_handle_type handle,
|
||||
time_point_sec expiration,
|
||||
uint32_t review_period_seconds,
|
||||
bool broadcast)
|
||||
{
|
||||
return my->propose_builder_transaction(handle, expiration, review_period_seconds, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::propose_builder_transaction2(
|
||||
transaction_handle_type handle,
|
||||
string account_name_or_id,
|
||||
time_point_sec expiration,
|
||||
uint32_t review_period_seconds,
|
||||
bool broadcast)
|
||||
{
|
||||
return my->propose_builder_transaction2(handle, account_name_or_id, expiration, review_period_seconds, broadcast);
|
||||
}
|
||||
|
||||
void wallet_api::remove_builder_transaction(transaction_handle_type handle)
|
||||
{
|
||||
return my->remove_builder_transaction(handle);
|
||||
|
|
|
|||
Loading…
Reference in a new issue