From a181a523c6e24a3ebc738e0b9afd78bb5fe9af03 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Mon, 1 Oct 2018 20:38:05 +0000 Subject: [PATCH] remove special case for 0-input 0-output transaction deserialization This creates two ways to encode an empty transaction; we should use only the Segwit-enabled one because that's what we do for 0-input non-0-output transactions. --- src/blockdata/transaction.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index a0b28d29..4df2b3bd 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -399,15 +399,6 @@ impl Decodable for Transaction { if input.is_empty() { let segwit_flag: u8 = Decodable::consensus_decode(d)?; match segwit_flag { - // Empty tx - 0 => { - Ok(Transaction { - version: version, - input: input, - output: vec![], - lock_time: Decodable::consensus_decode(d)?, - }) - } // BIP144 input witnesses 1 => { let mut input: Vec = Decodable::consensus_decode(d)?;