mirror of
				https://github.com/bitcoin/bitcoin.git
				synced 2024-05-17 23:56:39 +00:00 
			
		
		
		
	Merge #20303: fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding
d7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding (practicalswift) Pull request description: Assert expected `DecodeHexTx` behaviour when using legacy decoding. As suggested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/20290#issuecomment-720989597. ACKs for top commit: MarcoFalke: review ACK d7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 Tree-SHA512: 3285680059e6fa73b0fb2c52b775f6319de1ac616f731206662b742764dc888cdfd1ac1f1fcfdfd5418d2006475a852d1c1a56a7035f772f0a6b2a84f5de93bc
This commit is contained in:
		
						commit
						f33e332541
					
				| @ -19,12 +19,14 @@ void test_one_input(const std::vector<uint8_t>& buffer) | ||||
|     const bool result_none = DecodeHexTx(mtx, tx_hex, false, false); | ||||
|     const bool result_try_witness = DecodeHexTx(mtx, tx_hex, false, true); | ||||
|     const bool result_try_witness_and_maybe_no_witness = DecodeHexTx(mtx, tx_hex, true, true); | ||||
|     const bool result_try_no_witness = DecodeHexTx(mtx, tx_hex, true, false); | ||||
|     CMutableTransaction no_witness_mtx; | ||||
|     const bool result_try_no_witness = DecodeHexTx(no_witness_mtx, tx_hex, true, false); | ||||
|     assert(!result_none); | ||||
|     if (result_try_witness_and_maybe_no_witness) { | ||||
|         assert(result_try_no_witness || result_try_witness); | ||||
|     } | ||||
|     if (result_try_no_witness) { | ||||
|         assert(!no_witness_mtx.HasWitness()); | ||||
|         assert(result_try_witness_and_maybe_no_witness); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user