aboutsummaryrefslogtreecommitdiff
path: root/src/core.h
diff options
context:
space:
mode:
authorjtimon <jtimon@blockstream.io>2014-10-19 04:28:43 +0200
committerjtimon <jtimon@blockstream.io>2014-10-27 13:54:37 +0100
commit561e9e9de9793c187f29ab2d41b43a36447e9357 (patch)
treeef319f91d36d8568bd34a624e4420191f639230d /src/core.h
parent999a2ab41ec96311c145d74822c246a3b92a9b33 (diff)
downloadbitcoin-561e9e9de9793c187f29ab2d41b43a36447e9357.tar.xz
MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (from
core) with it
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/core.h b/src/core.h
index aeae9a1911..b2288e24ca 100644
--- a/src/core.h
+++ b/src/core.h
@@ -7,39 +7,9 @@
#define BITCOIN_CORE_H
#include "core/transaction.h"
-#include "script/compressor.h"
#include "serialize.h"
#include "uint256.h"
-/** wrapper for CTxOut that provides a more compact serialization */
-class CTxOutCompressor
-{
-private:
- CTxOut &txout;
-
-public:
- static uint64_t CompressAmount(uint64_t nAmount);
- static uint64_t DecompressAmount(uint64_t nAmount);
-
- CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
-
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!ser_action.ForRead()) {
- uint64_t nVal = CompressAmount(txout.nValue);
- READWRITE(VARINT(nVal));
- } else {
- uint64_t nVal = 0;
- READWRITE(VARINT(nVal));
- txout.nValue = DecompressAmount(nVal);
- }
- CScriptCompressor cscript(REF(txout.scriptPubKey));
- READWRITE(cscript);
- }
-};
-
/** Nodes collect new transactions into a block, hash them into a hash tree,
* and scan through nonce values to make the block's hash satisfy proof-of-work
* requirements. When they solve the proof-of-work, they broadcast the block