[SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)
This commit is contained in:
parent
4f72269cf6
commit
44db4f5c9b
3 changed files with 2 additions and 5 deletions
|
|
@ -31,7 +31,6 @@ namespace graphene { namespace chain {
|
|||
|
||||
sidechain_transaction_id_type sidechain_transaction_id;
|
||||
std::string signature;
|
||||
bool complete;
|
||||
|
||||
account_id_type fee_payer()const { return payer; }
|
||||
share_type calculate_fee( const fee_parameters_type& k )const { return 0; }
|
||||
|
|
@ -63,8 +62,7 @@ FC_REFLECT( graphene::chain::sidechain_transaction_create_operation, (fee)(payer
|
|||
FC_REFLECT( graphene::chain::sidechain_transaction_sign_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::sidechain_transaction_sign_operation, (fee)(payer)
|
||||
(sidechain_transaction_id)
|
||||
(signature)
|
||||
(complete) )
|
||||
(signature) )
|
||||
|
||||
FC_REFLECT( graphene::chain::sidechain_transaction_send_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::sidechain_transaction_send_operation, (fee)(payer)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ object_id_type sidechain_transaction_sign_evaluator::do_apply(const sidechain_tr
|
|||
sto.current_weight = sto.current_weight + sto.signers.at(i).weight;
|
||||
}
|
||||
}
|
||||
sto.complete = op.complete;
|
||||
sto.complete = (sto.current_weight >= sto.threshold);
|
||||
});
|
||||
|
||||
db().modify(son_obj->statistics(db()), [&](son_statistics_object& sso) {
|
||||
|
|
|
|||
|
|
@ -378,7 +378,6 @@ void sidechain_net_handler::process_sidechain_transactions() {
|
|||
sts_op.payer = plugin.get_current_son_object().son_account;
|
||||
sts_op.sidechain_transaction_id = sto.id;
|
||||
sts_op.signature = processed_sidechain_tx;
|
||||
sts_op.complete = complete;
|
||||
|
||||
signed_transaction trx = database.create_signed_transaction(plugin.get_private_key(plugin.get_current_son_id()), sts_op);
|
||||
trx.validate();
|
||||
|
|
|
|||
Loading…
Reference in a new issue