Release build fix, missing includes
This commit is contained in:
parent
fc1a815250
commit
2f0eb52086
5 changed files with 28 additions and 25 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include <fc/crypto/base58.hpp>
|
||||
#include <fc/crypto/sha256.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/bitcoin_address.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/bitcoin_script.hpp>
|
||||
#include <graphene/peerplays_sidechain/bitcoin/segwit_addr.hpp>
|
||||
|
|
@ -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::vector<std::
|
|||
|
||||
redeem_script_ = builder;
|
||||
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +324,7 @@ void btc_one_or_m_of_n_multisig_address::create_redeem_script(const fc::ecc::pub
|
|||
builder << op::CHECKMULTISIG;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
void btc_one_or_m_of_n_multisig_address::create_witness_script() {
|
||||
|
|
@ -384,7 +385,7 @@ void btc_one_or_weighted_multisig_address::create_redeem_script(const fc::ecc::p
|
|||
builder << op::GREATERTHANOREQUAL;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +449,7 @@ void btc_timelocked_one_or_weighted_multisig_address::create_redeem_script(const
|
|||
builder << op::GREATERTHANOREQUAL;
|
||||
builder << op::ENDIF;
|
||||
redeem_script_ = builder;
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_);
|
||||
fc::sha256 sh = fc::sha256::hash(redeem_script_.data(), redeem_script_.size());
|
||||
raw_address = bytes(sh.data(), sh.data() + sh.data_size());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ void peerplays_sidechain_plugin_impl::heartbeat_loop() {
|
|||
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 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@
|
|||
#include <fc/crypto/hex.hpp>
|
||||
#include <fc/log/logger.hpp>
|
||||
#include <fc/network/ip.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <graphene/chain/protocol/son_wallet.hpp>
|
||||
#include <graphene/chain/son_info.hpp>
|
||||
#include <graphene/chain/son_wallet_object.hpp>
|
||||
|
|
@ -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 "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue