Don't send transaction that is not signed
This commit is contained in:
parent
fbe263e2cb
commit
1f3beba32a
1 changed files with 6 additions and 0 deletions
|
|
@ -544,6 +544,11 @@ std::string sidechain_net_handler_ethereum::send_sidechain_transaction(const sid
|
|||
boost::property_tree::ptree pt_array;
|
||||
for (const auto &signature : sto.signatures) {
|
||||
const auto &transaction = signature.second;
|
||||
|
||||
//! Check if we have this signed transaction, if not, don't send it
|
||||
if(transaction.empty())
|
||||
continue;
|
||||
|
||||
#ifdef SEND_RAW_TRANSACTION
|
||||
const std::string sidechain_transaction = rpc_client->eth_send_raw_transaction(transaction);
|
||||
#else
|
||||
|
|
@ -562,6 +567,7 @@ std::string sidechain_net_handler_ethereum::send_sidechain_transaction(const sid
|
|||
//! Fixme
|
||||
//! How should we proceed with error in eth_send_transaction
|
||||
elog("Error in eth_send_transaction for transaction ${id}, transaction ${transaction}", ("id", sto.id)("transaction", transaction));
|
||||
return std::string{}; //! Return empty string, as we have error in sending
|
||||
}
|
||||
}
|
||||
pt.add_child("result_array", pt_array);
|
||||
|
|
|
|||
Loading…
Reference in a new issue