Less noise unless -debug is used

This commit is contained in:
Duke
2025-09-24 09:30:33 -04:00
parent e421dfc6a5
commit cb81fc3b95
4 changed files with 14 additions and 7 deletions

View File

@@ -274,7 +274,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
devnull.close() devnull.close()
port = extra_args[3] port = extra_args[3]
#port = rpc_port(i) #port = rpc_port(i)
print("port=%s" % port) #print("port=%s" % port)
username = rpc_username() username = rpc_username()
password = rpc_password() password = rpc_password()
url = "http://%s:%s@%s:%s" % (username, password, rpchost or '127.0.0.1', port[9:]) url = "http://%s:%s@%s:%s" % (username, password, rpchost or '127.0.0.1', port[9:])
@@ -283,7 +283,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
proxy = AuthServiceProxy(url, timeout=timewait) proxy = AuthServiceProxy(url, timeout=timewait)
else: else:
proxy = AuthServiceProxy(url) proxy = AuthServiceProxy(url)
print("created proxy") #print("created proxy")
proxy.url = url # store URL on proxy for info proxy.url = url # store URL on proxy for info
return proxy return proxy

View File

@@ -146,7 +146,9 @@ std::atomic<bool> fRequestShutdown(false);
void StartShutdown() void StartShutdown()
{ {
fprintf(stderr,"%s: fRequestShudown=true\n", __FUNCTION__); if(fDebug) {
fprintf(stderr,"%s: fRequestShudown=true\n", __FUNCTION__);
}
fRequestShutdown = true; fRequestShutdown = true;
} }
bool ShutdownRequested() bool ShutdownRequested()
@@ -208,7 +210,9 @@ void Shutdown()
RenameThread(shutoffstr); RenameThread(shutoffstr);
mempool.AddTransactionsUpdated(1); mempool.AddTransactionsUpdated(1);
fprintf(stderr,"%s: stopping HUSH HTTP/REST/RPC\n", __FUNCTION__); if(fDebug) {
fprintf(stderr,"%s: stopping HUSH HTTP/REST/RPC\n", __FUNCTION__);
}
StopHTTPRPC(); StopHTTPRPC();
StopREST(); StopREST();
StopRPC(); StopRPC();
@@ -225,7 +229,9 @@ void Shutdown()
GenerateBitcoins(false, 0); GenerateBitcoins(false, 0);
#endif #endif
#endif #endif
fprintf(stderr,"%s: stopping node\n", __FUNCTION__); if(fDebug) {
fprintf(stderr,"%s: stopping node\n", __FUNCTION__);
}
StopNode(); StopNode();
StopTorControl(); StopTorControl();
UnregisterNodeSignals(GetNodeSignals()); UnregisterNodeSignals(GetNodeSignals());

View File

@@ -776,7 +776,6 @@ void AsyncRPCOperation_sendmany::lock_notes() {
LogPrintf("%s: found %lu notes to lock\n", __func__, saplingNoteInputs_.size() ); LogPrintf("%s: found %lu notes to lock\n", __func__, saplingNoteInputs_.size() );
for (auto note : saplingNoteInputs_) { for (auto note : saplingNoteInputs_) {
if(pwalletMain->IsLockedNote(std::get<0>(note))) { if(pwalletMain->IsLockedNote(std::get<0>(note))) {
//TODO: deal with this
LogPrintf("%s: note already locked!\n", __func__); LogPrintf("%s: note already locked!\n", __func__);
} else { } else {
pwalletMain->LockNote(std::get<0>(note)); pwalletMain->LockNote(std::get<0>(note));
@@ -790,7 +789,6 @@ void AsyncRPCOperation_sendmany::unlock_notes() {
LogPrintf("%s: found %lu notes to unlock\n", __func__, saplingNoteInputs_.size() ); LogPrintf("%s: found %lu notes to unlock\n", __func__, saplingNoteInputs_.size() );
for (auto note : saplingNoteInputs_) { for (auto note : saplingNoteInputs_) {
if(pwalletMain->IsLockedNote(std::get<0>(note))) { if(pwalletMain->IsLockedNote(std::get<0>(note))) {
//TODO: deal with this
pwalletMain->UnlockNote(std::get<0>(note)); pwalletMain->UnlockNote(std::get<0>(note));
} else { } else {
LogPrintf("%s: note already unlocked!\n", __func__); LogPrintf("%s: note already unlocked!\n", __func__);

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright 2016-2025 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#export PYTHON_DEBUG=1 #export PYTHON_DEBUG=1
export PYTHONPATH=./qa/rpc-tests/test_framework/ export PYTHONPATH=./qa/rpc-tests/test_framework/