More review fixes

This commit is contained in:
Łukasz Magiera 2019-12-02 19:56:27 +01:00
parent 24be85e8ec
commit 5beb7f4a48
2 changed files with 4 additions and 10 deletions

View File

@ -25,14 +25,6 @@ import (
"github.com/filecoin-project/lotus/genesis"
)
var validSsizes = map[uint64]struct{}{}
func init() {
for _, size := range build.SectorSizes {
validSsizes[size] = struct{}{}
}
}
type GenesisBootstrap struct {
Genesis *types.BlockHeader
}
@ -326,7 +318,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid
if err := cst.Get(ctx, mact.Head, &mstate); err != nil {
return cid.Undef, nil, xerrors.Errorf("getting miner actor state failed: %w", err)
}
mstate.Power = types.NewInt(build.SectorSizes[0])
mstate.Power = types.BigMul(types.NewInt(build.SectorSizes[0]), types.NewInt(uint64(len(ps.Sectors))))
blks := amt.WrapBlockstore(cs.Blockstore())

View File

@ -3,6 +3,7 @@ package chain_test
import (
"context"
"fmt"
"os"
"testing"
"time"
@ -25,6 +26,7 @@ import (
func init() {
build.InsecurePoStValidation = true
os.Setenv("TRUST_PARAMS", "1")
}
const source = 0
@ -346,7 +348,7 @@ func (tu *syncTestUtil) waitUntilSyncTarget(to int, target *types.TipSet) {
}
func TestSyncSimple(t *testing.T) {
H := 2
H := 50
tu := prepSyncTest(t, H)
client := tu.addClientNode()