From 0e757b54f0fe6bb6a44add721d56f45d742d8e7e Mon Sep 17 00:00:00 2001 From: SwimmingTiger Date: Sat, 25 Apr 2020 17:29:43 +0800 Subject: [PATCH] sserver: log chain name when finding blocks --- .../test/bch/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/bch/testcase/0005-unittest | 5 ++- .../test/beam/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/beam/testcase/0005-unittest | 5 ++- .../test/bsv/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/bsv/testcase/0005-unittest | 5 ++- .../test/btc/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/btc/testcase/0005-unittest | 5 ++- .../test/ltc/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/ltc/testcase/0005-unittest | 5 ++- .../test/ubtc/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/ubtc/testcase/0005-unittest | 5 ++- .../test/zec/testcase/0000-build-image | 41 ++++++++++++++++++- .../btcpool/test/zec/testcase/0005-unittest | 5 ++- src/bitcoin/StratumServerBitcoin.cc | 4 +- src/eth/StratumServerEth.cc | 4 +- 16 files changed, 312 insertions(+), 18 deletions(-) mode change 120000 => 100755 docker/btcpool/test/bch/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/bch/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/beam/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/beam/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/bsv/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/bsv/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/btc/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/btc/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/ltc/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/ltc/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/ubtc/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/ubtc/testcase/0005-unittest mode change 120000 => 100755 docker/btcpool/test/zec/testcase/0000-build-image mode change 120000 => 100755 docker/btcpool/test/zec/testcase/0005-unittest diff --git a/docker/btcpool/test/bch/testcase/0000-build-image b/docker/btcpool/test/bch/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/bch/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/bch/testcase/0000-build-image b/docker/btcpool/test/bch/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/bch/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/bch/testcase/0005-unittest b/docker/btcpool/test/bch/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/bch/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/bch/testcase/0005-unittest b/docker/btcpool/test/bch/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/bch/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/beam/testcase/0000-build-image b/docker/btcpool/test/beam/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/beam/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/beam/testcase/0000-build-image b/docker/btcpool/test/beam/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/beam/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/beam/testcase/0005-unittest b/docker/btcpool/test/beam/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/beam/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/beam/testcase/0005-unittest b/docker/btcpool/test/beam/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/beam/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/bsv/testcase/0000-build-image b/docker/btcpool/test/bsv/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/bsv/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/bsv/testcase/0000-build-image b/docker/btcpool/test/bsv/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/bsv/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/bsv/testcase/0005-unittest b/docker/btcpool/test/bsv/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/bsv/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/bsv/testcase/0005-unittest b/docker/btcpool/test/bsv/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/bsv/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/btc/testcase/0000-build-image b/docker/btcpool/test/btc/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/btc/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/btc/testcase/0000-build-image b/docker/btcpool/test/btc/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/btc/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/btc/testcase/0005-unittest b/docker/btcpool/test/btc/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/btc/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/btc/testcase/0005-unittest b/docker/btcpool/test/btc/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/btc/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/ltc/testcase/0000-build-image b/docker/btcpool/test/ltc/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/ltc/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/ltc/testcase/0000-build-image b/docker/btcpool/test/ltc/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/ltc/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/ltc/testcase/0005-unittest b/docker/btcpool/test/ltc/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/ltc/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/ltc/testcase/0005-unittest b/docker/btcpool/test/ltc/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/ltc/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/ubtc/testcase/0000-build-image b/docker/btcpool/test/ubtc/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/ubtc/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/ubtc/testcase/0000-build-image b/docker/btcpool/test/ubtc/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/ubtc/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/ubtc/testcase/0005-unittest b/docker/btcpool/test/ubtc/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/ubtc/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/ubtc/testcase/0005-unittest b/docker/btcpool/test/ubtc/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/ubtc/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/docker/btcpool/test/zec/testcase/0000-build-image b/docker/btcpool/test/zec/testcase/0000-build-image deleted file mode 120000 index 8688e8d00..000000000 --- a/docker/btcpool/test/zec/testcase/0000-build-image +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0000-build-image \ No newline at end of file diff --git a/docker/btcpool/test/zec/testcase/0000-build-image b/docker/btcpool/test/zec/testcase/0000-build-image new file mode 100755 index 000000000..71ac0fd4c --- /dev/null +++ b/docker/btcpool/test/zec/testcase/0000-build-image @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +DOCKER_COMPOSE="docker-compose --no-ansi" + +BUILD_ARGS="--build-arg BUILD_JOBS=$(nproc) --build-arg BUILD_TESTING=ON" +if [ "$APT_MIRROR_URL" != "" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg APT_MIRROR_URL=$APT_MIRROR_URL" +fi +if [ "$NO_CACHE" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --no-cache" +fi + +if [ "$BUILD_BASE_IMAGE" != "" ]; then + echo "build base image..." + cd "$BASE_DIR/../../base-image" + docker build -t $BASE_IMAGE -f Dockerfile.btc $BUILD_ARGS . | tee -a $STDOUT + echo "done" +fi + +if [ "$DEBUG" = "1" ]; then + BUILD_ARGS="$BUILD_ARGS --build-arg BUILD_TYPE=Debug" +fi + +echo "build btcpool-$TEST_SUITE image..." +cd "$BASE_DIR/.." +echo "build args: $BUILD_ARGS" +docker build -t btccom/btcpool-$TEST_SUITE -f Dockerfile $BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE ../../.. | tee -a $STDOUT +echo "done" + +if [ -f "$BASE_DIR/docker-compose.yml" ]; then + echo "build docker compose..." + cd "$BASE_DIR" + $DOCKER_COMPOSE build | tee -a $STDOUT + echo "done" + + echo "clear old docker compose..." + $DOCKER_COMPOSE down | tee -a $STDOUT + echo "done" +fi diff --git a/docker/btcpool/test/zec/testcase/0005-unittest b/docker/btcpool/test/zec/testcase/0005-unittest deleted file mode 120000 index d5be04b19..000000000 --- a/docker/btcpool/test/zec/testcase/0005-unittest +++ /dev/null @@ -1 +0,0 @@ -../../common/testcase/0005-unittest \ No newline at end of file diff --git a/docker/btcpool/test/zec/testcase/0005-unittest b/docker/btcpool/test/zec/testcase/0005-unittest new file mode 100755 index 000000000..9af3fd7b7 --- /dev/null +++ b/docker/btcpool/test/zec/testcase/0005-unittest @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +docker run --rm btccom/btcpool-${TEST_SUITE} unittest diff --git a/src/bitcoin/StratumServerBitcoin.cc b/src/bitcoin/StratumServerBitcoin.cc index 2ab7a32b2..a0f585f69 100644 --- a/src/bitcoin/StratumServerBitcoin.cc +++ b/src/bitcoin/StratumServerBitcoin.cc @@ -623,7 +623,7 @@ void ServerBitcoin::checkShare( sendSolvedShare2Kafka(chainId, &foundBlock, coinbaseBin); if (sjob->proxyJobDifficulty_ > 0) { - LOG(INFO) << ">>>> solution found: " << blkHash.ToString() + LOG(INFO) << ">>>> [" << chainName(chainId) << "] solution found: " << blkHash.ToString() << ", jobId: " << share.jobid() << ", userId: " << share.userid() << ", by: " << workFullName << " <<<<"; @@ -633,7 +633,7 @@ void ServerBitcoin::checkShare( GetJobRepository(chainId)->markAllJobsAsStale(height); }); - LOG(INFO) << ">>>> found a new block: " << blkHash.ToString() + LOG(INFO) << ">>>> [" << chainName(chainId) << "] found a new block: " << blkHash.ToString() << ", jobId: " << share.jobid() << ", userId: " << share.userid() << ", by: " << workFullName << " <<<<"; diff --git a/src/eth/StratumServerEth.cc b/src/eth/StratumServerEth.cc index c80ec1a9d..fade4ca6c 100644 --- a/src/eth/StratumServerEth.cc +++ b/src/eth/StratumServerEth.cc @@ -493,7 +493,7 @@ void ServerEth::checkShareAndUpdateDiff( Uint256ToEthash256(sjob->networkTarget_, ethashTarget); if (ethash_quick_check_difficulty( ðashHeader, nonce, ðashMixHash, ðashTarget)) { - LOG(INFO) << "preliminary solution found, header hash: " + LOG(INFO) << "[" << chainName(chainId) << "] preliminary solution found, header hash: " << header.GetHex() << ", nonce: " << nonce << ", mix digest: " << mixHash->GetHex() << ", network target: " << sjob->networkTarget_.GetHex() @@ -598,7 +598,7 @@ void ServerEth::checkShareAndUpdateDiff( } if (isSubmitInvalidBlock_ || bnShareTarget <= bnNetworkTarget) { - LOG(INFO) << "solution found, share target: " << shareTarget.GetHex() + LOG(INFO) << "[" << chainName(chainId) << "] solution found, share target: " << shareTarget.GetHex() << ", network target: " << sjob->networkTarget_.GetHex() << ", worker: " << workFullName;