litecoincash-project / litecoincash

Main release & integration tree for Litecoin Cash
https://litecoinca.sh
MIT License
53 stars 39 forks source link

Trivial: Limit logging #29

Closed OBTfx closed 3 years ago

OBTfx commented 3 years ago

https://github.com/litecoincash-project/litecoincash/blob/da59c6856fb9b5532ae6a244c78c8f0dfe84f6f1/src/miner.cpp#L237

The log record could be limited, since when it requesting a template for SHA and for MinX in the same node, since it is mining with both algorithms, the log is filled with this.

#

2021-05-23 17:24:19 connect() to 104.248.84.57:62456 failed after select(): Connection refused (111)
2021-05-23 17:24:26 connect() to 143.244.44.6:62456 failed after select(): Connection refused (111)
2021-05-23 17:26:45 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:26:47 UpdateTip: new best=000000cb65b36764dada371e021b01259d723f8d3e0732aa9bd55857da4c87ca height=2383 version=0x00000000 log2_work=43.997445 tx=2570 date='2021-05-23 17:26:45' progress=0.999999 cache=0.0MiB(122txo)
2021-05-23 17:26:47 AddToWallet e0c2fea31622885c00db9ac7c87c57c282ce972fbbdf5140e36b9d13ee196f66  new
2021-05-23 17:26:47 ********************* Hive: Bees at work *********************
2021-05-23 17:26:47 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:26:50 BusyBees: No bee meets hash target (3000 bees checked with 3 threads in 3181ms)
2021-05-23 17:26:51 UpdateTip: new best=a36c2351328dd56b4a7e95e961711936c70a2fb3f7492c0ae0c62a7d5d299782 height=2384 version=0x00000000 log2_work=43.997448 tx=2571 date='2021-05-23 17:26:51' progress=1.000000 cache=0.0MiB(123txo)
2021-05-23 17:26:51 ********************* Hive: Bees at work *********************
2021-05-23 17:26:54 BusyBees: No bee meets hash target (3000 bees checked with 3 threads in 2908ms)
2021-05-23 17:26:55 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:27:13 UpdateTip: new best=ba1ff79245af9c97e063bfea83d41f1d21d02cd28ea9d442bca2324373af3cd1 height=2385 version=0x00000000 log2_work=43.997451 tx=2572 date='2021-05-23 17:27:14' progress=1.000000 cache=0.0MiB(124txo)
2021-05-23 17:27:13 BusyBees: Skipping hive check (max Hive blocks without a POW block reached)
2021-05-23 17:27:17 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:28:44 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:28:54 connect() to 143.244.47.85:62456 failed after select(): Connection refused (111)
2021-05-23 17:31:33 socket recv error No route to host (113)
2021-05-23 17:31:44 socket recv error Connection timed out (110)
2021-05-23 17:33:50 connect() to 37.19.197.137:62456 failed after select(): Connection refused (111)
2021-05-23 17:34:40 connect() to 143.244.44.6:62456 failed after select(): Connection refused (111)
2021-05-23 17:35:06 connect() to 95.223.76.26:62456 failed after select(): Connection refused (111)
2021-05-23 17:35:45 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:35:48 connect() to 104.248.84.57:62456 failed after select(): Connection refused (111)
2021-05-23 17:35:49 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:35:50 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:35:54 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:35:55 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:35:59 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:00 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:02 Potential stale tip detected, will try using extra outbound peer (last tip update: 529 seconds ago)
2021-05-23 17:36:05 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:05 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:10 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:10 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:16 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:21 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:21 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:25 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:27 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:31 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:33 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:36 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:38 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:43 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:48 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:48 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:53 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:36:59 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:04 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:09 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:10 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:14 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:15 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:20 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:20 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:25 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:25 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:30 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:35 CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400
2021-05-23 17:37:38 tor: Thread interrupt
2021-05-23 17:37:38 torcontrol thread exit
2021-05-23 17:37:38 addcon thread exit
2021-05-23 17:37:38 Shutdown: In progress...
2021-05-23 17:37:38 net thread exit
2021-05-23 17:37:38 UPNP_DeletePortMapping() returned: 0
2021-05-23 17:37:38 upnp thread interrupt
2021-05-23 17:37:38 msghand thread exit
2021-05-23 17:37:42 opencon thread exit
2021-05-23 17:37:42 !!! BeeKeeper: FATAL: Thread interrupted
2021-05-23 17:37:42 scheduler thread interrupt
2021-05-23 17:37:42 Dumped mempool: 5e-06s to copy, 0.002554s to dump
2021-05-23 17:37:42 Shutdown: done
litecoincash-project commented 3 years ago

Agreed; I don't see any problem with gating this logprintf on a debug level.

litecoincash-project commented 3 years ago

Your fix merged, with thanks!