diff --git a/src/supernode/AuthSample.cpp b/src/supernode/AuthSample.cpp index 223c00ee9..ea1bb57d4 100644 --- a/src/supernode/AuthSample.cpp +++ b/src/supernode/AuthSample.cpp @@ -53,7 +53,7 @@ bool supernode::AuthSample::PosProxySale(const rpc_command::POS_PROXY_SALE::requ Add(data); - LOG_PRINT_L5("ADD: "<Port()); + LOG_PRINT_L4("ADD: "<Port()); return true; } @@ -61,9 +61,9 @@ bool supernode::AuthSample::PosProxySale(const rpc_command::POS_PROXY_SALE::requ bool supernode::AuthSample::WalletProxyPay(const rpc_command::WALLET_PROXY_PAY::request& in, rpc_command::WALLET_PROXY_PAY::response& out) { boost::shared_ptr ff = ObjectByPayment(in.PaymentID); boost::shared_ptr data = boost::dynamic_pointer_cast(ff); - if(!data) { LOG_PRINT_L5("not found object: "<Port()); return false; } + if(!data) { LOG_PRINT_L4("not found object: "<Port()); return false; } - if( !data->WalletProxyPay(in, out) ) { LOG_PRINT_L5("!WalletProxyPay"); Remove(data); return false; } + if( !data->WalletProxyPay(in, out) ) { LOG_PRINT_L4("!WalletProxyPay"); Remove(data); return false; } return true; } diff --git a/src/supernode/AuthSampleObject.cpp b/src/supernode/AuthSampleObject.cpp index b41ecf059..087464e15 100644 --- a/src/supernode/AuthSampleObject.cpp +++ b/src/supernode/AuthSampleObject.cpp @@ -45,14 +45,10 @@ bool supernode::AuthSampleObject::Init(const RTA_TransactionRecord& src) { bool supernode::AuthSampleObject::WalletProxyPay(const rpc_command::WALLET_PROXY_PAY::request& inp, rpc_command::WALLET_PROXY_PAY::response& out) { RTA_TransactionRecord src; rpc_command::ConvertToTR(src, inp, m_Servant); - if(src!=TransactionRecord) { LOG_PRINT_L5("not eq records"); return false; } + if(src!=TransactionRecord) { LOG_PRINT_L4("not eq records"); return false; } string data = TransactionRecord.PaymentID + string(":") + inp.CustomerWalletAddr; bool signok = tools::GraftWallet::verifySignedMessage(data, inp.CustomerWalletAddr, inp.CustomerWalletSign, m_Servant->IsTestnet()); - //LOG_PRINT_L5("Check sign: "<SignByWalletPrivateKey( TransactionRecord.MessageForSign(), m_Servant->GetMyStakeWallet().Addr ); - //LOG_PRINT_L5("GenerateSignForTransaction: mes: "<GetMyStakeWallet().Addr<<" sign: "<SignByWalletPrivateKey( TransactionRecord.MessageForSign(), m_Servant->GetMyStakeWallet().Addr ); return sign; } diff --git a/src/supernode/BaseRTAProcessor.cpp b/src/supernode/BaseRTAProcessor.cpp index 603491669..d134684e9 100644 --- a/src/supernode/BaseRTAProcessor.cpp +++ b/src/supernode/BaseRTAProcessor.cpp @@ -69,7 +69,7 @@ boost::shared_ptr supernode::BaseRTAProcessor::ObjectB void supernode::BaseRTAProcessor::Remove(boost::shared_ptr obj) { obj->MarkForDelete(); - LOG_PRINT_L5("Remove: "<TransactionRecord.PaymentID); + LOG_PRINT_L4("Remove: "<TransactionRecord.PaymentID); { boost::lock_guard lock(m_ObjectsGuard); auto it = find(m_Objects.begin(), m_Objects.end(), obj); @@ -99,7 +99,6 @@ void supernode::BaseRTAProcessor::Tick() { boost::lock_guard lock(m_RemoveObjectsGuard); for(int i=0;iTimeMark).total_milliseconds()>(5*60*1000) ) { m_RemoveObjects.erase( m_RemoveObjects.begin()+i ); - //LOG_PRINT_L5("---- ERASE ----"); i--; } } diff --git a/src/supernode/DAPI_RPC_Client.h b/src/supernode/DAPI_RPC_Client.h index 001118260..f9a5d894d 100644 --- a/src/supernode/DAPI_RPC_Client.h +++ b/src/supernode/DAPI_RPC_Client.h @@ -66,18 +66,18 @@ namespace supernode { WasConnected = false; if(!invoke(rpc_command::DAPI_URI, rpc_command::DAPI_METHOD, req_param, timeout, std::addressof(pri))) { - LOG_PRINT_L5("Failed to invoke http request to " << call<<" URI: "<m_response_code != 200) { - LOG_PRINT_L5("Failed to invoke http request to " << call << ", wrong response code: " << pri->m_response_code); + LOG_PRINT_L4("Failed to invoke http request to " << call << ", wrong response code: " << pri->m_response_code); return false; } diff --git a/src/supernode/DAPI_RPC_Server.cpp b/src/supernode/DAPI_RPC_Server.cpp index 5796f0dcd..c6580c412 100644 --- a/src/supernode/DAPI_RPC_Server.cpp +++ b/src/supernode/DAPI_RPC_Server.cpp @@ -34,10 +34,6 @@ using namespace std; bool supernode::DAPI_RPC_Server::handle_http_request(const epee::net_utils::http::http_request_info& query_info, epee::net_utils::http::http_response_info& response, connection_context& m_conn_context) { //LOG_PRINT_L4("HTTP [" << m_conn_context.m_remote_address.host_str() << "] " << query_info.m_http_method_str << " " << query_info.m_URI); - //LOG_PRINT_L5("Got request"); - - //LOG_PRINT_L5("req in "<(rsp), response_info.m_body); - LOG_PRINT_L5( "Error: "< lock(m_Handlers_Guard); for(unsigned i=0;iProcess(ps, response_info.m_body) ) { LOG_PRINT_L5("Fail to process (ret false): "<Process(ps, response_info.m_body) ) { LOG_PRINT_L4("Fail to process (ret false): "<Miner.Addr; in.MinerViewKey = data->Miner.ViewKey; - //LOG_PRINT_L5("=1 Send AddFSN: "<Port()); m_P2P->Send(p2p_call::AddFSN, in); - //LOG_PRINT_L5("=2 Send AddFSN: "<Port()); } boost::shared_ptr FSN_ActualList::_OnAddFSN(const rpc_command::BROADCACT_ADD_FULL_SUPER_NODE& in ) { @@ -168,15 +166,12 @@ boost::shared_ptr FSN_ActualList::_OnAddFSN(const rpc_command::BROADCA } void FSN_ActualList::OnAddFSN(const rpc_command::BROADCACT_ADD_FULL_SUPER_NODE& in ) { - //LOG_PRINT_L5("=1 OnAddFSN: "<Port()); m_Work.Service.post( [this, in](){ OnAddFSNFromWorker(in); } ); } void FSN_ActualList::OnAddFSNFromWorker(const rpc_command::BROADCACT_ADD_FULL_SUPER_NODE& in ) { - //LOG_PRINT_L5("=1 OnAddFSNFromWorker: "<Port()); - boost::shared_ptr data; { boost::lock_guard lock(m_All_FSN_Guard); @@ -207,7 +202,6 @@ bool FSN_ActualList::CheckWalletOwner(boost::shared_ptr data, const st DAPI_RPC_Client call; call.Set(data->IP, data->Port); - //LOG_PRINT_L5("call to: "<IP<<":"<Port); if( !call.Invoke(dapi_call::FSN_CheckWalletOwnership, in, out) ) return false; return m_Servant->IsSignValid(in.Str, in.WalletAddr, out.Sign); diff --git a/src/supernode/PosProxy.cpp b/src/supernode/PosProxy.cpp index 47589d998..cb2e6f1f2 100644 --- a/src/supernode/PosProxy.cpp +++ b/src/supernode/PosProxy.cpp @@ -58,9 +58,6 @@ bool supernode::PosProxy::Sale(const rpc_command::POS_SALE::request& in, rpc_com data->ContinueInit(); } ); - -// LOG_PRINT_L5( "ADD: "<TransactionRecord.PaymentID ); - out.BlockNum = data->TransactionRecord.BlockNum; out.PaymentID = data->TransactionRecord.PaymentID; out.Result = STATUS_OK; diff --git a/src/supernode/PosSaleObject.cpp b/src/supernode/PosSaleObject.cpp index 71487a1f1..ad15516ac 100644 --- a/src/supernode/PosSaleObject.cpp +++ b/src/supernode/PosSaleObject.cpp @@ -112,7 +112,7 @@ bool supernode::PosSaleObject::Init(const RTA_TransactionRecordBase& src) { TransactionRecord.PaymentID = GeneratePaymentID(); TransactionRecord.BlockNum = m_Servant->GetCurrentBlockHeight(); TransactionRecord.AuthNodes = m_Servant->GetAuthSample( TransactionRecord.BlockNum ); - if( TransactionRecord.AuthNodes.empty() ) { LOG_PRINT_L5("SALE: AuthNodes.empty"); m_Status = NTransactionStatus::Fail; return false; } + if( TransactionRecord.AuthNodes.empty() ) { LOG_PRINT_L0("SALE: AuthNodes.empty"); m_Status = NTransactionStatus::Fail; return false; } m_Status = NTransactionStatus::InProgress; @@ -133,7 +133,7 @@ void supernode::PosSaleObject::ContinueInit() { inbr.SenderIP = m_DAPIServer->IP(); inbr.SenderPort = m_DAPIServer->Port(); if( !m_SubNetBroadcast.Send(dapi_call::PosProxySale, inbr, outv) || outv.empty() ) { - LOG_PRINT_L5("!Send dapi_call::PosProxySale"); + LOG_PRINT_L0("!Send dapi_call::PosProxySale"); m_Status = NTransactionStatus::Fail; } @@ -187,10 +187,6 @@ bool supernode::PosSaleObject::PoSTRSigned(const rpc_command::POS_TR_SIGNED::req return false; } - - //LOG_PRINT_L5("graft_tx_extra.Signs: "<Stake.Addr, sign); - LOG_PRINT_L5("Checking signature with wallet: " << authNode->Stake.Addr << " [" << sign << "] result: "<Port()<<" REM: "< lock(m_MembersGuard); for(unsigned i=0;iPort()<<" REM: "<=s_MaxNotAvailCount ) { m_Members.erase( m_Members.begin()+i ); -// LOG_PRINT_L5("IncNoConnectAndRemove =3 : "<Port()<<" REM: "< void DoCallInThread(string method, const IN_t in, OUT_t* outo, int* ret, string ip, string port) { - //LOG_PRINT_L5("call to: "<Port()); bool localcOk = false; bool wasNoConnect = false; for(unsigned k=0;ksign(data); - //LOG_PRINT_L5("CWA: "< vv_out; @@ -150,8 +147,6 @@ bool supernode::WalletPayObject::PutTXToPool() { return false; } - //for(auto& a : m_Signs) LOG_PRINT_L5("sign in m_Signs: "<1) conf_file = argv[1]; - LOG_PRINT_L5("conf: "<("log_level", 0)); mlog_set_log_level(gen_conf.get("log_level", 0)); - LOG_PRINT_L1("Log level: " << gen_conf.get("log_level", 0)); // TODO: Init all monero staff here // TODO: diff --git a/src/supernode/supernode_common_struct.h b/src/supernode/supernode_common_struct.h index 5570c0b6b..03e548aaa 100644 --- a/src/supernode/supernode_common_struct.h +++ b/src/supernode/supernode_common_struct.h @@ -39,8 +39,6 @@ #include "crypto/hash.h" using namespace std; -#define LOG_PRINT_L5(xx) { cout<<__FILE__<<" : "<