elements/src/bench
Wladimir J. van der Laan 62efead8a8
Merge #16046: util: Add type safe GetTime
fa013664ae util: Add type safe GetTime (MarcoFalke)

Pull request description:

  There are basically two ways to get the time in Bitcoin Core:
  * get the system time (via `GetSystemTimeInSeconds` or `GetTime{Millis,Micros}`)
  * get the mockable time (via `GetTime`)

  Both return the same type (a plain int). This can lead to (test-only) bugs such as 99464bc38e.

  Fix that by deprecating `GetTime` and adding a `GetTime<>` that returns the mockable time in a non-int type. The new util function is currently unused, but new code should it where possible.

ACKs for commit fa0136:
  promag:
    utACK fa013664.

Tree-SHA512: efab9c463f079fd8fd3030c479637c7b1e8be567a881234bd0f555c8f87e518e3b43ef2466128103db8fc40295aaf24e87ad76d91f338c631246fc703477e95c
2019-05-29 13:39:54 +02:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
.gitignore Ignore bench_bitcoin binary. 2015-10-06 17:46:12 +02:00
base58.cpp tests: Explicitly ignore the return value of DecodeBase58(...) 2018-11-05 16:52:59 +01:00
bech32.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
bench.cpp [refactor] interfaces: Add missing LockAnnotation for cs_main 2019-05-13 14:46:01 -04:00
bench.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
bench_bitcoin.cpp scripted-diff: Bump copyright headers in test, bench 2019-04-11 13:34:43 -04:00
block_assemble.cpp scripted-diff: Bump copyright headers in test, bench 2019-04-11 13:34:43 -04:00
ccoins_caching.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
chacha20.cpp Add ChaCha20 bench 2019-05-03 22:52:11 +02:00
checkblock.cpp Don't access out of bounds array entry array[sizeof(array)] 2018-10-05 16:48:16 +09:00
checkqueue.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
coin_selection.cpp bitcoin-wallet tool: Drop MakeChain calls 2019-04-10 09:51:37 -04:00
crypto_hash.cpp Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00
duplicate_inputs.cpp [refactor] interfaces: Add missing LockAnnotation for cs_main 2019-05-13 14:46:01 -04:00
examples.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
gcs_filter.cpp blockfilter: Refactor GCS params into struct. 2018-11-06 09:12:54 -08:00
lockedpool.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mempool_eviction.cpp test: Add missing validation locks 2018-12-17 14:27:29 -05:00
merkle_root.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
poly1305.cpp Add Poly1305 bench 2019-03-26 18:12:31 +01:00
prevector.cpp Drop defunct IS_TRIVIALLY_CONSTRUCTIBLE handling from prevector.h 2018-11-14 12:19:04 -05:00
rollingbloom.cpp bench: Add benchmark for CRollingBloomFilter::reset 2019-05-22 15:55:50 +01:00
rpc_mempool.cpp bench: Benchmark MempoolToJSON 2019-02-25 10:13:23 -05:00
util_time.cpp util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
verify_script.cpp Merge #13666: Always create signatures with Low R values 2018-08-13 12:07:20 +02:00
wallet_balance.cpp refactor: Add handleNotifications method to wallet 2019-04-17 14:20:44 -04:00