mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge #18292: fuzz: Add assert(script == decompressed_script)
fab0e5ba7f2777b86f1487234ed7cc4be9f72ea8 fuzz: Add assert(script == decompressed_script) (MarcoFalke) Pull request description: Presumably an oversight in https://github.com/bitcoin/bitcoin/pull/17926#discussion_r389262151 ACKs for top commit: practicalswift: Tested ACK fab0e5ba7f2777b86f1487234ed7cc4be9f72ea8 Tree-SHA512: 6dcec06169df497a540fd6ebbcd89f5db22257241b2bbe756de868742f9bc324b80d38dbababfa07e5f3a830aaae9fc6d168dcc2ca5d75da437bdf4dc4e0f370
This commit is contained in:
parent
c0ba1e3269
commit
c2b4dd698c
@ -46,10 +46,12 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
||||
CompressedScript compressed;
|
||||
if (CompressScript(script, compressed)) {
|
||||
const unsigned int size = compressed[0];
|
||||
compressed.erase(compressed.begin());
|
||||
assert(size <= 5);
|
||||
CScript decompressed_script;
|
||||
const bool ok = DecompressScript(decompressed_script, size, compressed);
|
||||
assert(ok);
|
||||
assert(script == decompressed_script);
|
||||
}
|
||||
|
||||
CTxDestination address;
|
||||
|
Loading…
Reference in New Issue
Block a user