aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-30 12:51:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-30 13:04:32 +0200
commitd2d7267e235a3778544f3d472763c61dbdc19b00 (patch)
tree9a6da9febaf80d61b3fb40d40ca8298ba315cdbe /src/test
parentff48f6267128fea636d6edfe39f2b44494c7246d (diff)
parent76a9aacd3fb75d5e0854e53bb3376f2ab603a561 (diff)
downloadbitcoin-d2d7267e235a3778544f3d472763c61dbdc19b00.tar.xz
Merge #12752: [MOVEONLY] Move compressor utility functions out of class
76a9aac Move compressor utility functions out of class (Pieter Wuille) Pull request description: This is a refactor from #10785 with no functionality change. Move the compresion utility functions out of CScriptCompressor, as a preparation for making the class templated. I'm submitting it as a separate PR as I think it's a general improvement to code readability, and to reduce the diff further on. Tree-SHA512: 3b3d17c2b96e43f752f512dd573296a6bb15cae165fbe3c79212a0970f5196a62a59a821d5100f29638af1e7461c9171f3dccb8112f005ee08da0ec7fe0073fd
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compress_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp
index 3c26013622..127cc154df 100644
--- a/src/test/compress_tests.cpp
+++ b/src/test/compress_tests.cpp
@@ -25,16 +25,16 @@
BOOST_FIXTURE_TEST_SUITE(compress_tests, BasicTestingSetup)
bool static TestEncode(uint64_t in) {
- return in == CTxOutCompressor::DecompressAmount(CTxOutCompressor::CompressAmount(in));
+ return in == DecompressAmount(CompressAmount(in));
}
bool static TestDecode(uint64_t in) {
- return in == CTxOutCompressor::CompressAmount(CTxOutCompressor::DecompressAmount(in));
+ return in == CompressAmount(DecompressAmount(in));
}
bool static TestPair(uint64_t dec, uint64_t enc) {
- return CTxOutCompressor::CompressAmount(dec) == enc &&
- CTxOutCompressor::DecompressAmount(enc) == dec;
+ return CompressAmount(dec) == enc &&
+ DecompressAmount(enc) == dec;
}
BOOST_AUTO_TEST_CASE(compress_amounts)