Transaction signing only by scheduled son
This commit is contained in:
parent
7abd1c958f
commit
4da8cee3cd
2 changed files with 16 additions and 16 deletions
|
|
@ -358,11 +358,9 @@ void peerplays_sidechain_plugin_impl::son_processing() {
|
||||||
current_son_id = son_id;
|
current_son_id = son_id;
|
||||||
|
|
||||||
// Tasks that are executed by all active SONs, no matter if scheduled
|
// Tasks that are executed by all active SONs, no matter if scheduled
|
||||||
// E.g. sending approvals and signing
|
// E.g. sending approvals and signing (only signing that can be done in parallel)
|
||||||
approve_proposals();
|
approve_proposals();
|
||||||
|
|
||||||
process_sidechain_transactions();
|
|
||||||
|
|
||||||
// Tasks that are executed by scheduled and active SON
|
// Tasks that are executed by scheduled and active SON
|
||||||
if (current_son_id == scheduled_son_id) {
|
if (current_son_id == scheduled_son_id) {
|
||||||
|
|
||||||
|
|
@ -376,6 +374,8 @@ void peerplays_sidechain_plugin_impl::son_processing() {
|
||||||
|
|
||||||
process_withdrawals();
|
process_withdrawals();
|
||||||
|
|
||||||
|
process_sidechain_transactions();
|
||||||
|
|
||||||
send_sidechain_transactions();
|
send_sidechain_transactions();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -883,19 +883,19 @@ std::string sidechain_net_handler_bitcoin::process_withdrawal(const son_wallet_w
|
||||||
|
|
||||||
std::string sidechain_net_handler_bitcoin::process_sidechain_transaction(const sidechain_transaction_object &sto, bool &complete) {
|
std::string sidechain_net_handler_bitcoin::process_sidechain_transaction(const sidechain_transaction_object &sto, bool &complete) {
|
||||||
|
|
||||||
//// Uncomment to get signing in order from sto.signers
|
// Uncomment to get signing in order from sto.signers
|
||||||
//son_id_type invalid_signer = son_id_type(0xFFFFFFFF);
|
son_id_type invalid_signer = son_id_type(0xFFFFFFFF);
|
||||||
//son_id_type next_signer = invalid_signer;
|
son_id_type next_signer = invalid_signer;
|
||||||
//for (auto &signer : sto.signers) {
|
for (auto &signer : sto.signers) {
|
||||||
// if (signer.second == false) {
|
if (signer.second == false) {
|
||||||
// next_signer = signer.first;
|
next_signer = signer.first;
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
//
|
|
||||||
//if ((next_signer == invalid_signer) || (next_signer != plugin.get_current_son_id())) {
|
if ((next_signer == invalid_signer) || (next_signer != plugin.get_current_son_id())) {
|
||||||
// return "";
|
return "";
|
||||||
//}
|
}
|
||||||
|
|
||||||
return sign_transaction(sto.transaction, complete);
|
return sign_transaction(sto.transaction, complete);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue