pull out constant
This commit is contained in:
parent
1aa3cf3043
commit
c44eeab51a
@ -8,6 +8,8 @@ import (
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
||||
const SectorSize = 1024
|
||||
|
||||
func init() {
|
||||
cbor.RegisterCborType(StorageMarketState{})
|
||||
cbor.RegisterCborType(CreateStorageMinerParams{})
|
||||
@ -90,7 +92,7 @@ func (sma StorageMarketActor) CreateStorageMiner(act *types.Actor, vmctx types.V
|
||||
}
|
||||
|
||||
func SupportedSectorSize(ssize types.BigInt) bool {
|
||||
if ssize.Uint64() == 1024 {
|
||||
if ssize.Uint64() == SectorSize {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -103,7 +103,7 @@ func TestStorageMarketActorCreateMiner(t *testing.T) {
|
||||
|
||||
params := &StorageMinerConstructorParams{
|
||||
Worker: maddr,
|
||||
SectorSize: types.NewInt(1024),
|
||||
SectorSize: types.NewInt(SectorSize),
|
||||
PeerID: "fakepeerid",
|
||||
}
|
||||
enc, err := cbor.DumpObject(params)
|
||||
|
Loading…
Reference in New Issue
Block a user