@@ -716,9 +716,12 @@ impl fmt::Display for TransactionDecoderError {
716716 E :: NoWitnesses => write ! ( f, "non-empty Segwit transaction with no witnesses" ) ,
717717 E :: LockTime ( ref e) => write_err ! ( f, "transaction decoder error" ; e) ,
718718 E :: EarlyEnd ( s) => write ! ( f, "early end of transaction (still decoding {})" , s) ,
719- E :: NullPrevoutInNonCoinbase ( index) => write ! ( f, "null prevout in non-coinbase transaction at input {}" , index) ,
720- E :: CoinbaseScriptSigTooSmall ( len) => write ! ( f, "coinbase scriptSig too small: {} bytes (min 2)" , len) ,
721- E :: CoinbaseScriptSigTooLarge ( len) => write ! ( f, "coinbase scriptSig too large: {} bytes (max 100)" , len) ,
719+ E :: NullPrevoutInNonCoinbase ( index) =>
720+ write ! ( f, "null prevout in non-coinbase transaction at input {}" , index) ,
721+ E :: CoinbaseScriptSigTooSmall ( len) =>
722+ write ! ( f, "coinbase scriptSig too small: {} bytes (min 2)" , len) ,
723+ E :: CoinbaseScriptSigTooLarge ( len) =>
724+ write ! ( f, "coinbase scriptSig too large: {} bytes (max 100)" , len) ,
722725 }
723726 }
724727}
@@ -2240,7 +2243,10 @@ mod tests {
22402243 decoder. push_bytes ( & mut slice) . unwrap ( ) ;
22412244 let err = decoder. end ( ) . expect_err ( "null prevout in non-coinbase tx should be rejected" ) ;
22422245
2243- assert_eq ! ( err, TransactionDecoderError ( TransactionDecoderErrorInner :: NullPrevoutInNonCoinbase ( 0 ) ) ) ;
2246+ assert_eq ! (
2247+ err,
2248+ TransactionDecoderError ( TransactionDecoderErrorInner :: NullPrevoutInNonCoinbase ( 0 ) )
2249+ ) ;
22442250 }
22452251
22462252 #[ test]
@@ -2256,7 +2262,10 @@ mod tests {
22562262 decoder. push_bytes ( & mut slice) . unwrap ( ) ;
22572263 let err = decoder. end ( ) . expect_err ( "coinbase with 1-byte scriptSig should be rejected" ) ;
22582264
2259- assert_eq ! ( err, TransactionDecoderError ( TransactionDecoderErrorInner :: CoinbaseScriptSigTooSmall ( 1 ) ) ) ;
2265+ assert_eq ! (
2266+ err,
2267+ TransactionDecoderError ( TransactionDecoderErrorInner :: CoinbaseScriptSigTooSmall ( 1 ) )
2268+ ) ;
22602269 }
22612270
22622271 #[ test]
@@ -2272,7 +2281,10 @@ mod tests {
22722281 decoder. push_bytes ( & mut slice) . unwrap ( ) ;
22732282 let err = decoder. end ( ) . expect_err ( "coinbase with 101-byte scriptSig should be rejected" ) ;
22742283
2275- assert_eq ! ( err, TransactionDecoderError ( TransactionDecoderErrorInner :: CoinbaseScriptSigTooLarge ( 101 ) ) ) ;
2284+ assert_eq ! (
2285+ err,
2286+ TransactionDecoderError ( TransactionDecoderErrorInner :: CoinbaseScriptSigTooLarge ( 101 ) )
2287+ ) ;
22762288 }
22772289
22782290 #[ test]
0 commit comments