@@ -64,7 +64,7 @@ func testSendOutputs(r *Harness, t *testing.T) {
6464
6565 // First, generate a small spend which will require only a single
6666 // input.
67- txid := genSpend (btcutil .Amount (5 * btcutil .SatoshiPerBitcoin ))
67+ txid := genSpend (btcutil .Amount (btcutil .SatoshiPerBitcoin ))
6868
6969 // Generate a single block, the transaction the wallet created should
7070 // be found in this block.
@@ -76,7 +76,7 @@ func testSendOutputs(r *Harness, t *testing.T) {
7676
7777 // Next, generate a spend much greater than the block reward. This
7878 // transaction should also have been mined properly.
79- txid = genSpend (btcutil .Amount (500 * btcutil .SatoshiPerBitcoin ))
79+ txid = genSpend (btcutil .Amount (10 * btcutil .SatoshiPerBitcoin ))
8080 blockHashes , err = r .Client .Generate (1 )
8181 if err != nil {
8282 t .Fatalf ("unable to generate single block: %v" , err )
@@ -154,7 +154,7 @@ func testActiveHarnesses(r *Harness, t *testing.T) {
154154 numInitialHarnesses := len (ActiveHarnesses ())
155155
156156 // Create a single test harness.
157- harness1 , err := New (& chaincfg .SimNetParams , nil , nil , "" )
157+ harness1 , err := New (& chaincfg .RegressionNetParams , nil , nil , "" )
158158 if err != nil {
159159 t .Fatal (err )
160160 }
@@ -182,7 +182,7 @@ func testJoinMempools(r *Harness, t *testing.T) {
182182 // Create a local test harness with only the genesis block. The nodes
183183 // will be synced below so the same transaction can be sent to both
184184 // nodes without it being an orphan.
185- harness , err := New (& chaincfg .SimNetParams , nil , nil , "" )
185+ harness , err := New (& chaincfg .RegressionNetParams , nil , nil , "" )
186186 if err != nil {
187187 t .Fatal (err )
188188 }
@@ -282,7 +282,7 @@ func testJoinMempools(r *Harness, t *testing.T) {
282282func testJoinBlocks (r * Harness , t * testing.T ) {
283283 // Create a second harness with only the genesis block so it is behind
284284 // the main harness.
285- harness , err := New (& chaincfg .SimNetParams , nil , nil , "" )
285+ harness , err := New (& chaincfg .RegressionNetParams , nil , nil , "" )
286286 if err != nil {
287287 t .Fatal (err )
288288 }
@@ -336,7 +336,7 @@ func testGenerateAndSubmitBlock(r *Harness, t *testing.T) {
336336 if err != nil {
337337 t .Fatalf ("unable to create script: %v" , err )
338338 }
339- output := wire .NewTxOut (btcutil .SatoshiPerBitcoin , pkScript )
339+ output := wire .NewTxOut (btcutil .SatoshiPerBitcoin / 50 , pkScript )
340340
341341 const numTxns = 5
342342 txns := make ([]* btcutil.Tx , 0 , numTxns )
@@ -470,7 +470,7 @@ func testGenerateAndSubmitBlockWithCustomCoinbaseOutputs(r *Harness,
470470func testMemWalletReorg (r * Harness , t * testing.T ) {
471471 // Create a fresh harness, we'll be using the main harness to force a
472472 // re-org on this local harness.
473- harness , err := New (& chaincfg .SimNetParams , nil , nil , "" )
473+ harness , err := New (& chaincfg .RegressionNetParams , nil , nil , "" )
474474 if err != nil {
475475 t .Fatal (err )
476476 }
@@ -479,8 +479,8 @@ func testMemWalletReorg(r *Harness, t *testing.T) {
479479 }
480480 defer harness .TearDown ()
481481
482- // The internal wallet of this harness should now have 250 BTC.
483- expectedBalance := btcutil .Amount (250 * btcutil .SatoshiPerBitcoin )
482+ // The internal wallet of this harness should now have 250 BTC, but BTC is 50x LBC per generated coin .
483+ expectedBalance := btcutil .Amount (5 * btcutil .SatoshiPerBitcoin )
484484 walletBalance := harness .ConfirmedBalance ()
485485 if expectedBalance != walletBalance {
486486 t .Fatalf ("wallet balance incorrect: expected %v, got %v" ,
@@ -521,7 +521,7 @@ func testMemWalletLockedOutputs(r *Harness, t *testing.T) {
521521 if err != nil {
522522 t .Fatalf ("unable to create script: %v" , err )
523523 }
524- outputAmt := btcutil .Amount (50 * btcutil .SatoshiPerBitcoin )
524+ outputAmt := btcutil .Amount (btcutil .SatoshiPerBitcoin )
525525 output := wire .NewTxOut (int64 (outputAmt ), pkScript )
526526 tx , err := r .CreateTransaction ([]* wire.TxOut {output }, 10 , true )
527527 if err != nil {
@@ -567,7 +567,7 @@ const (
567567
568568func TestMain (m * testing.M ) {
569569 var err error
570- mainHarness , err = New (& chaincfg .SimNetParams , nil , nil , "" )
570+ mainHarness , err = New (& chaincfg .RegressionNetParams , nil , nil , "" )
571571 if err != nil {
572572 fmt .Println ("unable to create main harness: " , err )
573573 os .Exit (1 )
0 commit comments