Use MockSbBuilder
This commit is contained in:
+1
-1
@@ -263,5 +263,5 @@ func TestDeadlineToggling(t *testing.T) {
|
||||
func TestVerifiedClientTopUp(t *testing.T) {
|
||||
logging.SetLogLevel("storageminer", "FATAL")
|
||||
logging.SetLogLevel("chain", "ERROR")
|
||||
test.AddVerifiedClient(t, builder.Builder)
|
||||
test.AddVerifiedClient(t, builder.MockSbBuilder)
|
||||
}
|
||||
|
||||
+19
-2
@@ -284,7 +284,7 @@ func mockBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []test.
|
||||
|
||||
vrk := genesis.Actor{
|
||||
Type: genesis.TAccount,
|
||||
Balance: big.Mul(big.NewInt(400000000), types.NewInt(build.FilecoinPrecision)),
|
||||
Balance: big.Mul(big.Div(big.NewInt(int64(build.FilBase)), big.NewInt(100)), big.NewInt(int64(build.FilecoinPrecision))),
|
||||
Meta: (&genesis.AccountMeta{Owner: rkhKey.Address}).ActorMeta(),
|
||||
}
|
||||
keys = append(keys, rkhKey)
|
||||
@@ -457,12 +457,25 @@ func mockSbBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []tes
|
||||
maddrs = append(maddrs, maddr)
|
||||
genms = append(genms, *genm)
|
||||
}
|
||||
|
||||
rkhKey, err := wallet.GenerateKey(types.KTSecp256k1)
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
vrk := genesis.Actor{
|
||||
Type: genesis.TAccount,
|
||||
Balance: big.Mul(big.Div(big.NewInt(int64(build.FilBase)), big.NewInt(100)), big.NewInt(int64(build.FilecoinPrecision))),
|
||||
Meta: (&genesis.AccountMeta{Owner: rkhKey.Address}).ActorMeta(),
|
||||
}
|
||||
keys = append(keys, rkhKey)
|
||||
|
||||
templ := &genesis.Template{
|
||||
Accounts: genaccs,
|
||||
Miners: genms,
|
||||
NetworkName: "test",
|
||||
Timestamp: uint64(time.Now().Unix()) - (build.BlockDelaySecs * 20000),
|
||||
VerifregRootKey: gen.DefaultVerifregRootkeyActor,
|
||||
VerifregRootKey: vrk,
|
||||
RemainderAccount: gen.DefaultRemainderAccountActor,
|
||||
}
|
||||
|
||||
@@ -511,6 +524,10 @@ func mockSbBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []tes
|
||||
))
|
||||
}
|
||||
|
||||
if _, err := fulls[0].FullNode.WalletImport(ctx, &rkhKey.KeyInfo); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for i, def := range storage {
|
||||
// TODO: support non-bootstrap miners
|
||||
|
||||
|
||||
Reference in New Issue
Block a user