Move compressor utility functions out of class

This commit is contained in:
Pieter Wuille
2017-07-08 16:43:34 -07:00
parent 2405ce1df0
commit 76a9aacd3f
3 changed files with 33 additions and 36 deletions

View File

@@ -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)