2014-06-28 17:35:22 +02:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
2018-07-27 00:36:45 +02:00
|
|
|
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
2014-12-13 05:09:33 +01:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2014-06-28 17:35:22 +02:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2019-12-16 13:29:51 +01:00
|
|
|
#include <crypto/common.h>
|
2017-11-10 01:57:53 +01:00
|
|
|
#include <uint256.h>
|
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-21 16:11:09 +02:00
|
|
|
|
2019-12-16 13:29:51 +01:00
|
|
|
uint64_t GetCheapHash(const uint256& hash)
|
2014-06-28 17:35:22 +02:00
|
|
|
{
|
2019-12-16 13:29:51 +01:00
|
|
|
return ReadLE64(hash.begin());
|
2014-06-28 17:35:22 +02:00
|
|
|
}
|