From a086b1349542741baf8bffc659070a601c49c97d Mon Sep 17 00:00:00 2001 From: Serki Date: Fri, 16 Oct 2020 11:41:30 +0200 Subject: [PATCH] Release build fix, missing includes --- .../bitcoin/bitcoin_address.cpp | 15 ++++++++------- .../peerplays_sidechain_plugin.cpp | 8 ++++---- .../peerplays_sidechain/sidechain_net_handler.cpp | 12 ++++++------ .../sidechain_net_handler_bitcoin.cpp | 10 +++++----- .../sidechain_net_handler_peerplays.cpp | 8 +++++--- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/libraries/plugins/peerplays_sidechain/bitcoin/bitcoin_address.cpp b/libraries/plugins/peerplays_sidechain/bitcoin/bitcoin_address.cpp index 4c10899f..69b28ee1 100644 --- a/libraries/plugins/peerplays_sidechain/bitcoin/bitcoin_address.cpp +++ b/libraries/plugins/peerplays_sidechain/bitcoin/bitcoin_address.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -99,7 +100,7 @@ bool bitcoin_address::is_p2pk() const { parse_hex(address); return true; } - } catch (fc::exception e) { + } catch (fc::exception &e) { return false; } return false; @@ -121,7 +122,7 @@ bool bitcoin_address::is_p2pkh() const { return true; } return false; - } catch (fc::exception e) { + } catch (fc::exception &e) { return false; } } @@ -134,7 +135,7 @@ bool bitcoin_address::is_p2sh() const { return true; } return false; - } catch (fc::exception e) { + } catch (fc::exception &e) { return false; } } @@ -269,7 +270,7 @@ void btc_weighted_multisig_address::create_redeem_script(const std::vectorbroadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending heartbeat failed with exception ${e}", ("e", e.what())); return false; } @@ -468,7 +468,7 @@ void peerplays_sidechain_plugin_impl::approve_proposals() { if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending approval failed with exception ${e}", ("e", e.what())); return false; } @@ -544,7 +544,7 @@ void peerplays_sidechain_plugin_impl::create_son_down_proposals() { if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending son down proposal failed with exception ${e}", ("e", e.what())); return false; } @@ -579,7 +579,7 @@ void peerplays_sidechain_plugin_impl::create_son_deregister_proposals() { if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending son deregister proposal failed with exception ${e}", ("e", e.what())); return false; } diff --git a/libraries/plugins/peerplays_sidechain/sidechain_net_handler.cpp b/libraries/plugins/peerplays_sidechain/sidechain_net_handler.cpp index ed404efe..c02f8c5d 100644 --- a/libraries/plugins/peerplays_sidechain/sidechain_net_handler.cpp +++ b/libraries/plugins/peerplays_sidechain/sidechain_net_handler.cpp @@ -138,7 +138,7 @@ bool sidechain_net_handler::approve_proposal(const proposal_id_type &proposal_id if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending approval from ${son_id} for proposal ${proposal_id} failed with exception ${e}", ("son_id", son_id)("proposal_id", proposal_id)("e", e.what())); return false; @@ -205,7 +205,7 @@ void sidechain_net_handler::sidechain_event_data_received(const sidechain_event_ database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending son wallet deposit create operation by ${son} failed with exception ${e}", ("son", son_id)("e", e.what())); } } @@ -247,7 +247,7 @@ void sidechain_net_handler::sidechain_event_data_received(const sidechain_event_ database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending son wallet withdraw create operation by ${son} failed with exception ${e}", ("son", son_id)("e", e.what())); } } @@ -460,7 +460,7 @@ void sidechain_net_handler::process_sidechain_transactions() { database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for sidechain transaction sign operation failed with exception ${e}", ("e", e.what())); } }); @@ -495,7 +495,7 @@ void sidechain_net_handler::send_sidechain_transactions() { database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for sidechain transaction send operation failed with exception ${e}", ("e", e.what())); } }); @@ -560,7 +560,7 @@ void sidechain_net_handler::settle_sidechain_transactions() { database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for sidechain transaction settle operation failed with exception ${e}", ("e", e.what())); } }); diff --git a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp index 48f641c3..dc5e88af 100644 --- a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp +++ b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp @@ -940,7 +940,7 @@ sidechain_net_handler_bitcoin::sidechain_net_handler_bitcoin(peerplays_sidechain fc::http::connection conn; try { conn.connect_to(fc::ip::endpoint(fc::ip::address(ip), rpc_port)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("No BTC node running at ${ip} or wrong rpc port: ${port}", ("ip", ip)("port", rpc_port)); FC_ASSERT(false); } @@ -1324,7 +1324,7 @@ void sidechain_net_handler_bitcoin::process_primary_wallet() { database.push_transaction(trx, database::validation_steps::skip_block_size_check); if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for son wallet update operation failed with exception ${e}", ("e", e.what())); return; } @@ -1375,7 +1375,7 @@ void sidechain_net_handler_bitcoin::process_sidechain_addresses() { if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what())); return false; } @@ -1420,7 +1420,7 @@ bool sidechain_net_handler_bitcoin::process_deposit(const son_wallet_deposit_obj if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what())); return false; } @@ -1464,7 +1464,7 @@ bool sidechain_net_handler_bitcoin::process_withdrawal(const son_wallet_withdraw if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for withdraw sidechain transaction create operation failed with exception ${e}", ("e", e.what())); return false; } diff --git a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp index 3388527a..ecf3cc00 100644 --- a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp +++ b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp @@ -11,8 +11,10 @@ #include #include #include +#include #include +#include #include #include #include @@ -149,7 +151,7 @@ void sidechain_net_handler_peerplays::process_sidechain_addresses() { if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending transaction for update deposit address operation failed with exception ${e}", ("e", e.what())); return false; } @@ -203,7 +205,7 @@ bool sidechain_net_handler_peerplays::process_deposit(const son_wallet_deposit_o if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return true; - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sending proposal for deposit sidechain transaction create operation failed with exception ${e}", ("e", e.what())); return false; } @@ -254,7 +256,7 @@ std::string sidechain_net_handler_peerplays::send_sidechain_transaction(const si if (plugin.app().p2p_node()) plugin.app().p2p_node()->broadcast(net::trx_message(trx)); return trx.id().str(); - } catch (fc::exception e) { + } catch (fc::exception &e) { elog("Sidechain transaction failed with exception ${e}", ("e", e.what())); return ""; }