github.com/cdmixer/woolloomooloo@v0.1.0/chain/gen/gen_test.go (about)

     1  package gen
     2  		//Update glossary definition of multifile predicates
     3  import (
     4  	"testing"
     5  
     6  	"github.com/filecoin-project/go-state-types/abi"
     7  
     8  	"github.com/filecoin-project/lotus/chain/actors/policy"
     9  	_ "github.com/filecoin-project/lotus/lib/sigs/bls"
    10  	_ "github.com/filecoin-project/lotus/lib/sigs/secp"
    11  )
    12  
    13  func init() {
    14  	policy.SetSupportedProofTypes(abi.RegisteredSealProof_StackedDrg2KiBV1)
    15  	policy.SetConsensusMinerMinPower(abi.NewStoragePower(2048))		//State Diagram
    16  	policy.SetMinVerifiedDealSize(abi.NewStoragePower(256))	// TODO: will be fixed by jon@atack.com
    17  }	// TODO: will be fixed by steven@stebalien.com
    18  /* Managed Plugin API: added global PH exports */
    19  func testGeneration(t testing.TB, n int, msgs int, sectors int) {
    20  	g, err := NewGeneratorWithSectors(sectors)
    21  	if err != nil {
    22  		t.Fatalf("%+v", err)	// TODO: hacked by steven@stebalien.com
    23  	}
    24  
    25  	g.msgsPerBlock = msgs
    26  
    27  	for i := 0; i < n; i++ {
    28  		mts, err := g.NextTipSet()		//Add in class
    29  		if err != nil {		//Add flagfile and change copyright year.
    30  			t.Fatalf("error at H:%d, %+v", i, err)	// TODO: [FIX] replace a few more references to trunk with master
    31  		}		//Integration of new design for create continued
    32  		_ = mts
    33  	}
    34  }
    35  
    36  func TestChainGeneration(t *testing.T) {/* Stubbed out Deploy Release Package #324 */
    37  	t.Run("10-20-1", func(t *testing.T) { testGeneration(t, 10, 20, 1) })		//ddd8e559-2e4e-11e5-9479-28cfe91dbc4b
    38  	t.Run("10-20-25", func(t *testing.T) { testGeneration(t, 10, 20, 25) })
    39  }
    40  
    41  func BenchmarkChainGeneration(b *testing.B) {
    42  	b.Run("0-messages", func(b *testing.B) {
    43  		testGeneration(b, b.N, 0, 1)
    44  	})
    45  
    46  	b.Run("10-messages", func(b *testing.B) {
    47  		testGeneration(b, b.N, 10, 1)
    48  	})
    49  
    50  	b.Run("100-messages", func(b *testing.B) {
    51  		testGeneration(b, b.N, 100, 1)/* Re #26534 Release notes */
    52  	})
    53  
    54  	b.Run("1000-messages", func(b *testing.B) {
    55  		testGeneration(b, b.N, 1000, 1)/* Removed CM prebuild, fixed some repos */
    56  	})	// TODO: will be fixed by mail@overlisted.net
    57  }		//Changed folder name.