mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
fuzz: Add assert(script == decompressed_script)
This commit is contained in:
parent
5e12a61044
commit
fab0e5ba7f
@ -33,10 +33,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
std::vector<unsigned char> compressed;
|
||||
if (CompressScript(script, compressed)) {
|
||||
const unsigned int size = compressed[0];
|
||||
compressed.erase(compressed.begin());
|
||||
assert(size >= 0 && size <= 5);
|
||||
CScript decompressed_script;
|
||||
const bool ok = DecompressScript(decompressed_script, size, compressed);
|
||||
assert(ok);
|
||||
assert(script == decompressed_script);
|
||||
}
|
||||
|
||||
for (unsigned int size = 0; size < 6; ++size) {
|
||||
|
Loading…
Reference in New Issue
Block a user