@@ -393,32 +393,27 @@ impl Decoder for TransactionDecoder {
393393 // Still more bytes required.
394394 return Ok ( true ) ;
395395 }
396- } ,
397- State :: Inputs ( _, _, decoder) => {
396+ }
397+ State :: Inputs ( _, _, decoder) =>
398398 if decoder. push_bytes ( bytes) ? {
399399 return Ok ( true ) ;
400- }
401- } ,
402- State :: SegwitFlag ( _) => {
400+ } ,
401+ State :: SegwitFlag ( _) =>
403402 if bytes. is_empty ( ) {
404403 return Ok ( true ) ;
405- }
406- } ,
407- State :: Outputs ( _, _, _, decoder) => {
404+ } ,
405+ State :: Outputs ( _, _, _, decoder) =>
408406 if decoder. push_bytes ( bytes) ? {
409407 return Ok ( true ) ;
410- }
411- } ,
412- State :: Witnesses ( _, _, _, _, decoder) => {
408+ } ,
409+ State :: Witnesses ( _, _, _, _, decoder) =>
413410 if decoder. push_bytes ( bytes) ? {
414411 return Ok ( true ) ;
415- }
416- } ,
417- State :: LockTime ( _, _, _, decoder) => {
412+ } ,
413+ State :: LockTime ( _, _, _, decoder) =>
418414 if decoder. push_bytes ( bytes) ? {
419415 return Ok ( true ) ;
420- }
421- } ,
416+ } ,
422417 State :: Done ( ..) => return Ok ( false ) ,
423418 State :: Errored => panic ! ( "call to push_bytes() after decoder errored" ) ,
424419 }
@@ -1719,8 +1714,8 @@ mod tests {
17191714 assert_eq ! (
17201715 encoder. current_chunk( ) ,
17211716 & [
1722- 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 ,
1723- 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
1717+ 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 , 12 ,
1718+ 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
17241719 ] [ ..]
17251720 ) ;
17261721 assert ! ( encoder. advance( ) ) ;
@@ -1766,8 +1761,8 @@ mod tests {
17661761 assert_eq ! (
17671762 encoder. current_chunk( ) ,
17681763 & [
1769- 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 ,
1770- 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
1764+ 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 , 12 ,
1765+ 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
17711766 ] [ ..]
17721767 ) ;
17731768 assert ! ( encoder. advance( ) ) ;
@@ -1814,8 +1809,8 @@ mod tests {
18141809 assert_eq ! (
18151810 encoder. current_chunk( ) ,
18161811 & [
1817- 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 ,
1818- 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
1812+ 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 , 12 ,
1813+ 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
18191814 ] [ ..]
18201815 ) ;
18211816 assert ! ( encoder. advance( ) ) ;
@@ -1881,10 +1876,9 @@ mod tests {
18811876 assert_eq ! (
18821877 encoder. current_chunk( ) ,
18831878 & [
1884- 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 ,
1885- 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
1879+ 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 , 12 ,
1880+ 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
18861881 ] [ ..]
1887-
18881882 ) ;
18891883 assert ! ( encoder. advance( ) ) ;
18901884 assert_eq ! ( encoder. current_chunk( ) , & [ 1u8 , 0 , 0 , 0 ] [ ..] ) ;
@@ -1998,8 +1992,8 @@ mod tests {
19981992 assert_eq ! (
19991993 encoder. current_chunk( ) ,
20001994 & [
2001- 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 ,
2002- 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
1995+ 32 , 31 , 30 , 29 , 28 , 27 , 26 , 25 , 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 16 , 15 , 14 , 13 , 12 ,
1996+ 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1
20031997 ] [ ..]
20041998 ) ;
20051999 assert ! ( encoder. advance( ) ) ;
0 commit comments