diff --git a/api/api_storage.go b/api/api_storage.go index 5c41473f4..ef960edcf 100644 --- a/api/api_storage.go +++ b/api/api_storage.go @@ -58,7 +58,7 @@ type StorageMiner interface { ActorSectorSize(context.Context, address.Address) (uint64, error) // Temp api for testing - StoreGarbageData(context.Context) error + PledgeSector(context.Context) error // Get the status of a given sector by ID SectorsStatus(context.Context, uint64) (SectorInfo, error) diff --git a/api/struct.go b/api/struct.go index 12b03f4ed..c0ab86713 100644 --- a/api/struct.go +++ b/api/struct.go @@ -134,7 +134,7 @@ type StorageMinerStruct struct { ActorAddress func(context.Context) (address.Address, error) `perm:"read"` ActorSectorSize func(context.Context, address.Address) (uint64, error) `perm:"read"` - StoreGarbageData func(context.Context) error `perm:"write"` + PledgeSector func(context.Context) error `perm:"write"` SectorsStatus func(context.Context, uint64) (SectorInfo, error) `perm:"read"` SectorsList func(context.Context) ([]uint64, error) `perm:"read"` @@ -496,8 +496,8 @@ func (c *StorageMinerStruct) ActorSectorSize(ctx context.Context, addr address.A return c.Internal.ActorSectorSize(ctx, addr) } -func (c *StorageMinerStruct) StoreGarbageData(ctx context.Context) error { - return c.Internal.StoreGarbageData(ctx) +func (c *StorageMinerStruct) PledgeSector(ctx context.Context) error { + return c.Internal.PledgeSector(ctx) } // Get the status of a given sector by ID diff --git a/cmd/lotus-storage-miner/main.go b/cmd/lotus-storage-miner/main.go index 26913a17a..868ae4c8d 100644 --- a/cmd/lotus-storage-miner/main.go +++ b/cmd/lotus-storage-miner/main.go @@ -24,7 +24,7 @@ func main() { runCmd, initCmd, infoCmd, - storeGarbageCmd, + pledgeSectorCmd, sectorsCmd, } jaeger := tracing.SetupJaegerTracing("lotus") diff --git a/cmd/lotus-storage-miner/sectors.go b/cmd/lotus-storage-miner/sectors.go index 2b7a7e177..62e62f3da 100644 --- a/cmd/lotus-storage-miner/sectors.go +++ b/cmd/lotus-storage-miner/sectors.go @@ -12,7 +12,7 @@ import ( lcli "github.com/filecoin-project/lotus/cli" ) -var storeGarbageCmd = &cli.Command{ +var pledgeSectorCmd = &cli.Command{ Name: "pledge-sector", Usage: "store random data in a sector", Action: func(cctx *cli.Context) error { @@ -23,7 +23,7 @@ var storeGarbageCmd = &cli.Command{ defer closer() ctx := lcli.ReqContext(cctx) - return nodeApi.StoreGarbageData(ctx) + return nodeApi.PledgeSector(ctx) }, } diff --git a/lotuspond/front/src/StorageNode.js b/lotuspond/front/src/StorageNode.js index 7851fbb4a..c5c917778 100644 --- a/lotuspond/front/src/StorageNode.js +++ b/lotuspond/front/src/StorageNode.js @@ -37,7 +37,7 @@ class StorageNode extends React.Component { } this.loadInfo = this.loadInfo.bind(this) - this.sealGarbage = this.sealGarbage.bind(this) + this.pledgeSector = this.pledgeSector.bind(this) this.stop = this.stop.bind(this) this.connect() @@ -98,8 +98,8 @@ class StorageNode extends React.Component { this.setState({staged, statusCounts}) } - async sealGarbage() { - await this.state.client.call("Filecoin.StoreGarbageData", []) + async pledgeSector() { + await this.state.client.call("Filecoin.PledgeSector", []) } sealStaged = async () => { @@ -113,7 +113,7 @@ class StorageNode extends React.Component { render() { let runtime =
if (this.state.actor) { - const sealGarbage = [Seal Garbage] + const pledgeSector = [Pledge Sector] const sealStaged = [Seal Staged] runtime = ( @@ -121,7 +121,7 @@ class StorageNode extends React.Component {