Remove dead code
This commit is contained in:
parent
10e4288cc6
commit
f5442a50d1
5 changed files with 1 additions and 55 deletions
|
|
@ -35,11 +35,6 @@ protected:
|
|||
|
||||
std::map<std::string, std::string> private_keys;
|
||||
|
||||
virtual std::string create_multisignature_wallet(const std::vector<std::string> public_keys) = 0;
|
||||
virtual std::string transfer(const std::string &from, const std::string &to, const uint64_t amount) = 0;
|
||||
virtual std::string sign_transaction(const std::string &transaction) = 0;
|
||||
virtual std::string send_transaction(const std::string &transaction) = 0;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ public:
|
|||
class bitcoin_rpc_client {
|
||||
public:
|
||||
bitcoin_rpc_client(std::string _ip, uint32_t _rpc, std::string _user, std::string _password, std::string _wallet, std::string _wallet_password);
|
||||
bool connection_is_not_defined() const;
|
||||
|
||||
std::string addmultisigaddress(const std::vector<std::string> public_keys);
|
||||
std::string createpsbt(const std::vector<btc_txout> &ins, const fc::flat_map<std::string, double> outs);
|
||||
|
|
@ -64,9 +63,6 @@ private:
|
|||
class zmq_listener {
|
||||
public:
|
||||
zmq_listener(std::string _ip, uint32_t _zmq);
|
||||
bool connection_is_not_defined() const {
|
||||
return zmq_port == 0;
|
||||
}
|
||||
|
||||
fc::signal<void(const std::string &)> event_received;
|
||||
|
||||
|
|
@ -104,10 +100,6 @@ private:
|
|||
std::unique_ptr<bitcoin_rpc_client> bitcoin_client;
|
||||
std::unique_ptr<zmq_listener> listener;
|
||||
|
||||
std::string create_multisignature_wallet(const std::vector<std::string> public_keys);
|
||||
std::string transfer(const std::string &from, const std::string &to, const uint64_t amount);
|
||||
std::string sign_transaction(const std::string &transaction);
|
||||
std::string send_transaction(const std::string &transaction);
|
||||
std::string sign_and_send_transaction_with_wallet(const std::string &tx_json);
|
||||
std::string processpsbt(const std::string &tx_psbt);
|
||||
std::string transfer_all_btc(const std::string &from_address, const std::string &to_address);
|
||||
|
|
|
|||
|
|
@ -18,11 +18,6 @@ public:
|
|||
void process_withdrawal(const son_wallet_withdraw_object &swwo);
|
||||
|
||||
private:
|
||||
std::string create_multisignature_wallet(const std::vector<std::string> public_keys);
|
||||
std::string transfer(const std::string &from, const std::string &to, const uint64_t amount);
|
||||
std::string sign_transaction(const std::string &transaction);
|
||||
std::string send_transaction(const std::string &transaction);
|
||||
|
||||
void on_applied_block(const signed_block &b);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@ bitcoin_rpc_client::bitcoin_rpc_client(std::string _ip, uint32_t _rpc, std::stri
|
|||
authorization.val = "Basic " + fc::base64_encode(user + ":" + password);
|
||||
}
|
||||
|
||||
bool bitcoin_rpc_client::connection_is_not_defined() const {
|
||||
return ip.empty() || rpc_port == 0 || user.empty() || password.empty();
|
||||
}
|
||||
|
||||
std::string bitcoin_rpc_client::addmultisigaddress(const std::vector<std::string> public_keys) {
|
||||
std::string body = std::string("{\"jsonrpc\": \"1.0\", \"id\":\"addmultisigaddress\", "
|
||||
"\"method\": \"addmultisigaddress\", \"params\": [");
|
||||
|
|
@ -789,7 +785,7 @@ void sidechain_net_handler_bitcoin::recreate_primary_wallet() {
|
|||
for (const son_info &si : active_sons) {
|
||||
son_pubkeys_bitcoin.push_back(si.sidechain_public_keys.at(sidechain_type::bitcoin));
|
||||
}
|
||||
string reply_str = create_multisignature_wallet(son_pubkeys_bitcoin);
|
||||
string reply_str = bitcoin_client->addmultisigaddress(son_pubkeys_bitcoin);
|
||||
|
||||
std::stringstream active_pw_ss(reply_str);
|
||||
boost::property_tree::ptree active_pw_pt;
|
||||
|
|
@ -845,22 +841,6 @@ void sidechain_net_handler_bitcoin::process_withdrawal(const son_wallet_withdraw
|
|||
transfer_withdrawal_from_primary_wallet(swwo);
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_bitcoin::create_multisignature_wallet(const std::vector<std::string> public_keys) {
|
||||
return bitcoin_client->addmultisigaddress(public_keys);
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_bitcoin::transfer(const std::string &from, const std::string &to, const uint64_t amount) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_bitcoin::sign_transaction(const std::string &transaction) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_bitcoin::send_transaction(const std::string &transaction) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_bitcoin::sign_and_send_transaction_with_wallet(const std::string &tx_json) {
|
||||
std::string reply_str = tx_json;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,22 +39,6 @@ void sidechain_net_handler_peerplays::process_deposit(const son_wallet_deposit_o
|
|||
void sidechain_net_handler_peerplays::process_withdrawal(const son_wallet_withdraw_object &swwo) {
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_peerplays::create_multisignature_wallet(const std::vector<std::string> public_keys) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_peerplays::transfer(const std::string &from, const std::string &to, const uint64_t amount) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_peerplays::sign_transaction(const std::string &transaction) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string sidechain_net_handler_peerplays::send_transaction(const std::string &transaction) {
|
||||
return "";
|
||||
}
|
||||
|
||||
void sidechain_net_handler_peerplays::on_applied_block(const signed_block &b) {
|
||||
for (const auto &trx : b.transactions) {
|
||||
size_t operation_index = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue