Skip to content

Commit

Permalink
Merge bitcoin#29254: log: Don't use scientific notation in log messages
Browse files Browse the repository at this point in the history
c819a83 Don't use scientific notation in log messages (Kristaps Kaupe)

Pull request description:

  Don't see any benefits here, only harder to read for most of the users.

  Before:
  ```
  2024-01-16T13:11:36Z Dumped mempool: 8.165e-06s to copy, 0.00224268s to dump
  ```

  After:
  ```
  2024-01-16T13:11:36Z Dumped mempool: 0.000s to copy, 0.002s to dump
  ```

ACKs for top commit:
  kristapsk:
    > > > > lgtm ACK [c819a83](bitcoin@c819a83). can you update the PR description?
  glozow:
    lgtm ACK c819a83. can you update the PR description?

Tree-SHA512: 0972e0a05934e1b014fdeca0c235065aa017ba9abf74b3018f514e4d8022ef02b7f042a07d3675144b51449492468aea6b5b0183233ad7f1bab887d18e3d06af
  • Loading branch information
glozow committed Feb 5, 2024
2 parents cd3683c + c819a83 commit 9eeee7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kernel/mempool_persist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock
}
auto last = SteadyClock::now();

LogPrintf("Dumped mempool: %gs to copy, %gs to dump\n",
LogPrintf("Dumped mempool: %.3fs to copy, %.3fs to dump\n",
Ticks<SecondsDouble>(mid - start),
Ticks<SecondsDouble>(last - mid));
} catch (const std::exception& e) {
Expand Down
2 changes: 1 addition & 1 deletion src/policy/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ void CBlockPolicyEstimator::FlushUnconfirmed()
_removeTx(mi->first, false); // this calls erase() on mapMemPoolTxs
}
const auto endclear{SteadyClock::now()};
LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %gs\n", num_entries, Ticks<SecondsDouble>(endclear - startclear));
LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %.3fs\n", num_entries, Ticks<SecondsDouble>(endclear - startclear));
}

std::chrono::hours CBlockPolicyEstimator::GetFeeEstimatorFileAge()
Expand Down

0 comments on commit 9eeee7c

Please sign in to comment.