@@ -988,6 +988,7 @@ public void CanBuildShuffleColoredTransaction()
988988 var repo = new NoSqlColoredTransactionRepository ( new NoSqlTransactionRepository ( ) , new InMemoryNoSqlRepository ( ) ) ;
989989
990990 var init = Network . CreateTransaction ( ) ;
991+ init . Inputs . Add ( ) ;
991992 init . Outputs . Add ( "1.0" , gold . PubKey ) ;
992993 init . Outputs . Add ( "1.0" , silver . PubKey ) ;
993994 init . Outputs . Add ( "1.0" , satoshi . PubKey ) ;
@@ -1279,6 +1280,7 @@ public void CanBuildColoredTransaction()
12791280 var repo = new NoSqlColoredTransactionRepository ( ) ;
12801281
12811282 var init = Network . CreateTransaction ( ) ;
1283+ init . Inputs . Add ( ) ;
12821284 init . Outputs . Add ( "1.0" , gold . PubKey ) ;
12831285 init . Outputs . Add ( "1.0" , silver . PubKey ) ;
12841286 init . Outputs . Add ( "1.0" , satoshi . PubKey ) ;
@@ -1375,6 +1377,7 @@ public void CanBuildColoredTransaction()
13751377
13761378 //Gold receive 2.5 BTC
13771379 tx = txBuilder . Network . Consensus . ConsensusFactory . CreateTransaction ( ) ;
1380+ tx . Inputs . Add ( ) ;
13781381 tx . Outputs . Add ( "2.5" , gold . PubKey ) ;
13791382 repo . Transactions . Put ( tx . GetHash ( ) , tx ) ;
13801383
@@ -1762,6 +1765,7 @@ public void CanEstimateFees()
17621765 builder . SendEstimatedFees ( rate ) ;
17631766 signed = builder . BuildTransaction ( true ) ;
17641767 Assert . True ( builder . Verify ( signed , estimatedFees ) ) ;
1768+ Assert . Equal ( 1174 , builder . EstimateSize ( signed ) ) ;
17651769 }
17661770
17671771 private Coin RandomCoin ( Money amount , IDestination dest , bool p2sh )
@@ -1924,23 +1928,6 @@ void BitcoinStreamCoverageCore<TItem>(TItem[] input, BitcoinStreamCoverageCoreDe
19241928 AssertEx . CollectionEquals ( before , input ) ;
19251929 }
19261930
1927- [ Fact ]
1928- [ Trait ( "UnitTest" , "UnitTest" ) ]
1929- public void CanSerializeInvalidTransactionsBackAndForth ( )
1930- {
1931- Transaction before = Network . CreateTransaction ( ) ;
1932- var versionBefore = before . Version ;
1933- before . Outputs . Add ( new TxOut ( ) ) ;
1934- Transaction after = AssertClone ( before ) ;
1935- Assert . Equal ( before . Version , after . Version ) ;
1936- Assert . Equal ( versionBefore , after . Version ) ;
1937- Assert . True ( after . Outputs . Count == 1 ) ;
1938-
1939- before = Network . CreateTransaction ( ) ;
1940- after = AssertClone ( before ) ;
1941- Assert . Equal ( before . Version , versionBefore ) ;
1942- }
1943-
19441931 private Transaction AssertClone ( Transaction before )
19451932 {
19461933 Transaction after = before . Clone ( ) ;
@@ -2100,6 +2087,7 @@ public void CanFilterUneconomicalCoins()
21002087 var bob = new Key ( ) ;
21012088 //P2SH(P2WSH)
21022089 var previousTx = Network . CreateTransaction ( ) ;
2090+ previousTx . Inputs . Add ( ) ;
21032091 previousTx . Outputs . Add ( new TxOut ( Money . Coins ( 1.0m ) , alice . PubKey . ScriptPubKey . WitHash . ScriptPubKey . Hash ) ) ;
21042092 var previousCoin = previousTx . Outputs . AsCoins ( ) . First ( ) ;
21052093
@@ -2658,6 +2646,7 @@ public void CanBuildTransactionWithDustPrevention()
26582646 var bob = new Key ( ) ;
26592647 var alice = new Key ( ) ;
26602648 var tx = Network . CreateTransaction ( ) ;
2649+ tx . Inputs . Add ( ) ;
26612650 tx . Outputs . Add ( Money . Coins ( 1.0m ) , bob ) ;
26622651 var coins = tx . Outputs . AsCoins ( ) . ToArray ( ) ;
26632652
@@ -2852,6 +2841,7 @@ public void CanMutateSignature()
28522841 public void CanUseLockTime ( )
28532842 {
28542843 var tx = Network . CreateTransaction ( ) ;
2844+ tx . Inputs . Add ( ) ;
28552845 tx . LockTime = new LockTime ( 4 ) ;
28562846 var clone = tx . Clone ( ) ;
28572847 Assert . Equal ( tx . LockTime , clone . LockTime ) ;
@@ -3082,6 +3072,7 @@ public void witnessHasPushSizeLimit()
30823072 {
30833073 var bob = new Key ( ) . GetWif ( Network . RegTest ) ;
30843074 Transaction tx = Network . CreateTransaction ( ) ;
3075+ tx . Inputs . Add ( ) ;
30853076 tx . Outputs . Add ( new TxOut ( Money . Coins ( 1.0m ) , bob . PubKey . ScriptPubKey . WitHash ) ) ;
30863077 ScriptCoin coin = new ScriptCoin ( tx . Outputs . AsCoins ( ) . First ( ) , bob . PubKey . ScriptPubKey ) ;
30873078
0 commit comments