Fix silly log and make swarm logs error

This commit is contained in:
beaudan 2019-05-13 06:24:27 +10:00
parent d3efa9a19e
commit d902bed32b
2 changed files with 5 additions and 4 deletions

View file

@ -159,8 +159,9 @@ void request_swarm_update(boost::asio::io_context& ioc,
[cb = std::move(cb)](const sn_response_t&& res) {
if (res.body) {
parse_swarm_update(res.body, std::move(cb));
} else {
BOOST_LOG_TRIVIAL(error) << "ERROR: Didn't get swarm request body";
}
BOOST_LOG_TRIVIAL(error) << "ERROR: Didn't get swarm request body";
});
}

View file

@ -636,7 +636,7 @@ void ServiceNode::process_push_batch(const std::string& blob) {
bool ServiceNode::is_pubkey_for_us(const std::string& pk) const {
if (!swarm_) {
BOOST_LOG_TRIVIAL(trace) << "swarm data missing";
BOOST_LOG_TRIVIAL(error) << "swarm data missing";
return false;
}
return swarm_->is_pubkey_for_us(pk);
@ -645,7 +645,7 @@ bool ServiceNode::is_pubkey_for_us(const std::string& pk) const {
std::vector<sn_record_t> ServiceNode::get_snodes_by_pk(const std::string& pk) {
if (!swarm_) {
BOOST_LOG_TRIVIAL(trace) << "swarm data missing";
BOOST_LOG_TRIVIAL(error) << "swarm data missing";
return {};
}
@ -670,7 +670,7 @@ bool ServiceNode::is_snode_address_known(const std::string& sn_address) {
// TODO: need more robust handling of uninitialized swarm_
if (!swarm_) {
BOOST_LOG_TRIVIAL(trace) << "swarm data missing";
BOOST_LOG_TRIVIAL(error) << "swarm data missing";
return {};
}