@@ -987,6 +987,7 @@ public void CanBuildShuffleColoredTransaction()
987987 var repo = new NoSqlColoredTransactionRepository ( new NoSqlTransactionRepository ( ) , new InMemoryNoSqlRepository ( ) ) ;
988988
989989 var init = Network . CreateTransaction ( ) ;
990+ init . Inputs . Add ( ) ;
990991 init . Outputs . Add ( "1.0" , gold . PubKey ) ;
991992 init . Outputs . Add ( "1.0" , silver . PubKey ) ;
992993 init . Outputs . Add ( "1.0" , satoshi . PubKey ) ;
@@ -1278,6 +1279,7 @@ public void CanBuildColoredTransaction()
12781279 var repo = new NoSqlColoredTransactionRepository ( ) ;
12791280
12801281 var init = Network . CreateTransaction ( ) ;
1282+ init . Inputs . Add ( ) ;
12811283 init . Outputs . Add ( "1.0" , gold . PubKey ) ;
12821284 init . Outputs . Add ( "1.0" , silver . PubKey ) ;
12831285 init . Outputs . Add ( "1.0" , satoshi . PubKey ) ;
@@ -1374,6 +1376,7 @@ public void CanBuildColoredTransaction()
13741376
13751377 //Gold receive 2.5 BTC
13761378 tx = txBuilder . Network . Consensus . ConsensusFactory . CreateTransaction ( ) ;
1379+ tx . Inputs . Add ( ) ;
13771380 tx . Outputs . Add ( "2.5" , gold . PubKey ) ;
13781381 repo . Transactions . Put ( tx . GetHash ( ) , tx ) ;
13791382
@@ -1761,6 +1764,7 @@ public void CanEstimateFees()
17611764 builder . SendEstimatedFees ( rate ) ;
17621765 signed = builder . BuildTransaction ( true ) ;
17631766 Assert . True ( builder . Verify ( signed , estimatedFees ) ) ;
1767+ Assert . Equal ( 1174 , builder . EstimateSize ( signed ) ) ;
17641768 }
17651769
17661770 private Coin RandomCoin ( Money amount , IDestination dest , bool p2sh )
@@ -1919,23 +1923,6 @@ void BitcoinStreamCoverageCore<TItem>(TItem[] input, BitcoinStreamCoverageCoreDe
19191923 AssertEx . CollectionEquals ( before , input ) ;
19201924 }
19211925
1922- [ Fact ]
1923- [ Trait ( "UnitTest" , "UnitTest" ) ]
1924- public void CanSerializeInvalidTransactionsBackAndForth ( )
1925- {
1926- Transaction before = Network . CreateTransaction ( ) ;
1927- var versionBefore = before . Version ;
1928- before . Outputs . Add ( new TxOut ( ) ) ;
1929- Transaction after = AssertClone ( before ) ;
1930- Assert . Equal ( before . Version , after . Version ) ;
1931- Assert . Equal ( versionBefore , after . Version ) ;
1932- Assert . True ( after . Outputs . Count == 1 ) ;
1933-
1934- before = Network . CreateTransaction ( ) ;
1935- after = AssertClone ( before ) ;
1936- Assert . Equal ( before . Version , versionBefore ) ;
1937- }
1938-
19391926 private Transaction AssertClone ( Transaction before )
19401927 {
19411928 Transaction after = before . Clone ( ) ;
@@ -2095,6 +2082,7 @@ public void CanFilterUneconomicalCoins()
20952082 var bob = new Key ( ) ;
20962083 //P2SH(P2WSH)
20972084 var previousTx = Network . CreateTransaction ( ) ;
2085+ previousTx . Inputs . Add ( ) ;
20982086 previousTx . Outputs . Add ( new TxOut ( Money . Coins ( 1.0m ) , alice . PubKey . ScriptPubKey . WitHash . ScriptPubKey . Hash ) ) ;
20992087 var previousCoin = previousTx . Outputs . AsCoins ( ) . First ( ) ;
21002088
@@ -2643,6 +2631,7 @@ public void CanBuildTransactionWithDustPrevention()
26432631 var bob = new Key ( ) ;
26442632 var alice = new Key ( ) ;
26452633 var tx = Network . CreateTransaction ( ) ;
2634+ tx . Inputs . Add ( ) ;
26462635 tx . Outputs . Add ( Money . Coins ( 1.0m ) , bob ) ;
26472636 var coins = tx . Outputs . AsCoins ( ) . ToArray ( ) ;
26482637
@@ -2837,6 +2826,7 @@ public void CanMutateSignature()
28372826 public void CanUseLockTime ( )
28382827 {
28392828 var tx = Network . CreateTransaction ( ) ;
2829+ tx . Inputs . Add ( ) ;
28402830 tx . LockTime = new LockTime ( 4 ) ;
28412831 var clone = tx . Clone ( ) ;
28422832 Assert . Equal ( tx . LockTime , clone . LockTime ) ;
@@ -3067,6 +3057,7 @@ public void witnessHasPushSizeLimit()
30673057 {
30683058 var bob = new Key ( ) . GetWif ( Network . RegTest ) ;
30693059 Transaction tx = Network . CreateTransaction ( ) ;
3060+ tx . Inputs . Add ( ) ;
30703061 tx . Outputs . Add ( new TxOut ( Money . Coins ( 1.0m ) , bob . PubKey . ScriptPubKey . WitHash ) ) ;
30713062 ScriptCoin coin = new ScriptCoin ( tx . Outputs . AsCoins ( ) . First ( ) , bob . PubKey . ScriptPubKey ) ;
30723063
0 commit comments