Skip to content

Terminal is cleared at ccminer start #2

@PSLLSP

Description

@PSLLSP

Terminal/screen is cleared at start of ccminer. It makes troubleshooting difficult.
Screen can always be cleared with a startup batch file, this action should not be in client for terminal..


fix:

$ git diff
diff --git a/ccminer.cpp b/ccminer.cpp
index c303c09..da9d714 100644
--- a/ccminer.cpp
+++ b/ccminer.cpp
@@ -3442,7 +3442,6 @@ int main(int argc, char *argv[])
        // get opt_quiet early
        parse_single_opt('q', argc, argv);
        
-       Clear();
        printf("*************************************************************\n");      
        printf("*  ccminer CPU: " PACKAGE_VERSION " for Verushash v2.2.2 based on ccminer *\n");
        printf("*************************************************************\n");      

DEMO:

$ cat test-clear.sh
#!/bin/sh

PORT=3333  # FIXME!

if [ "$PORT" = "3333" ]; then
  echo "This is IMPORTANT information!!"
  echo "ccminer cannot connect to port 3333, please, fix the TCP port"
  echo
fi
echo "HINT: run with parameter -P to see stratum protocol, sh $0 -P"
# clear # clear the screen if you have to...

./ccminer -a verus -o stratum+tcp://eu-01.miningrigrentals.com:$PORT -u droidMiner.217232 -p CLEAR -t1 "$@"

Important information was lost when ccminer was started:

$ sh test-clear.sh
*************************************************************
*  ccminer CPU: 3.8.3 for Verushash v2.2.2 based on ccminer *
*************************************************************
Originally based on Christian Buchner and Christian H. project
Adapted to Verus by Monkins1010
Goto https://wiki.verus.io/#!index.md for mining setup guides. 
Git repo located at: http://github.com/monkins1010/ccminer 

[2023-12-10 10:31:36] Starting on stratum+tcp://eu-01.miningrigrentals.com:3333
[2023-12-10 10:31:36] 2 miner threads started, using 'verus' algorithm.
[2023-12-10 10:31:36] Server requested reconnection to stratum+tcp://eu-01.miningrigrentals.com:52740
[2023-12-10 10:31:37] Server requested reconnection to stratum+tcp://eu-01.miningrigrentals.com:52740
[2023-12-10 10:31:37] Server requested reconnection to stratum+tcp://eu-01.miningrigrentals.com:52740

Or just try to debug script:

$ sh -x test-clear.sh
*************************************************************
*  ccminer CPU: 3.8.3 for Verushash v2.2.2 based on ccminer *
*************************************************************
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions