interim checkin of the rebased code
This commit is contained in:
@@ -696,6 +696,16 @@ bool t_command_parser_executor::ban(const std::vector<std::string>& args)
|
||||
std::ifstream ifs(ban_list_path.string());
|
||||
for (std::string line; std::getline(ifs, line); )
|
||||
{
|
||||
// ignore comments after '#' character
|
||||
const size_t pound_idx = line.find('#');
|
||||
if (pound_idx != std::string::npos)
|
||||
line.resize(pound_idx);
|
||||
|
||||
// trim whitespace and ignore empty lines
|
||||
boost::trim(line);
|
||||
if (line.empty())
|
||||
continue;
|
||||
|
||||
auto subnet = net::get_ipv4_subnet_address(line);
|
||||
if (subnet)
|
||||
{
|
||||
|
||||
+3
-3
@@ -83,7 +83,7 @@ uint16_t parse_public_rpc_port(const po::variables_map &vm)
|
||||
}
|
||||
|
||||
uint16_t rpc_port;
|
||||
if (!string_tools::get_xtype_from_string(rpc_port, rpc_port_str))
|
||||
if (!epee::string_tools::get_xtype_from_string(rpc_port, rpc_port_str))
|
||||
{
|
||||
throw std::runtime_error("invalid RPC port " + rpc_port_str);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ bool isFat32(const wchar_t* root_path)
|
||||
|
||||
// Helper function to generate genesis transaction
|
||||
void print_genesis_tx_hex(const cryptonote::network_type nettype) {
|
||||
|
||||
/*
|
||||
using namespace cryptonote;
|
||||
|
||||
account_base miner_acc1;
|
||||
@@ -168,7 +168,7 @@ void print_genesis_tx_hex(const cryptonote::network_type nettype) {
|
||||
std::string tx_hex = ss.str();
|
||||
std::cout << "Insert this line into your coin configuration file: " << std::endl;
|
||||
std::cout << "std::string const GENESIS_TX = \"" << epee::string_tools::buff_to_hex_nodelimer(tx_hex) << "\";" << std::endl;
|
||||
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1064,7 +1064,7 @@ bool t_rpc_command_executor::print_transaction(crypto::hash transaction_hash,
|
||||
cryptonote::blobdata blob;
|
||||
std::string source = as_hex.empty() ? pruned_as_hex + prunable_as_hex : as_hex;
|
||||
bool pruned = !pruned_as_hex.empty() && prunable_as_hex.empty();
|
||||
if (!string_tools::parse_hexstr_to_binbuff(source, blob))
|
||||
if (!epee::string_tools::parse_hexstr_to_binbuff(source, blob))
|
||||
{
|
||||
tools::fail_msg_writer() << "Failed to parse tx to get json format";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user