ipfsclient: Add some docs

This commit is contained in:
Łukasz Magiera 2020-04-30 13:19:37 +02:00
parent 0d4bf2e980
commit a0bdf95845
4 changed files with 28 additions and 5 deletions

View File

@ -28,7 +28,7 @@ var mpoolPending = &cli.Command{
Usage: "Get pending messages",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "local",
Name: "local",
Usage: "print pending messages for addresses in local wallet only",
},
},
@ -61,7 +61,7 @@ var mpoolPending = &cli.Command{
}
for _, msg := range msgs {
if filter != nil{
if filter != nil {
if _, has := filter[msg.Message.From]; !has {
continue
}
@ -123,7 +123,7 @@ var mpoolStat = &cli.Command{
Usage: "print mempool stats",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "local",
Name: "local",
Usage: "print stats for addresses in local wallet only",
},
},
@ -163,7 +163,7 @@ var mpoolStat = &cli.Command{
buckets := map[address.Address]*statBucket{}
for _, v := range msgs {
if filter != nil{
if filter != nil {
if _, has := filter[v.Message.From]; !has {
continue
}

View File

@ -107,6 +107,12 @@
"slug": "en+info-for-miners",
"github": "en/miner-deals.md",
"value": null
},
{
"title": "IPFS Integration",
"slug": "en+ipfs-client-integration",
"github": "en/storing-ipfs-integration.md",
"value": null
}
]
},

View File

@ -55,7 +55,6 @@ Check the status of a deal:
lotus client list-deals
```
- Price is in attoFIL.
- The `duration`, which represents how long the miner will keep your file hosted, is represented in blocks. Each block represents 45 seconds.
Upon success, this command will return a **Deal CID**.

View File

@ -0,0 +1,18 @@
# IPFS Integration
Lotus supports making deals with data stored in IPFS, without having to re-import it into lotus.
To enable this integration, open up `~/.lotus/config.toml` (Or if you manually set `LOTUS_PATH`, look under that directory) and look for the Client field, and set `UseIpfs` to `true`.
```toml
[Client]
UseIpfs = true
```
After restarting the lotus daemon, you should be able to make deals with data in your IPFS node:
```sh
$ ipfs add -r SomeData
QmSomeData
$ ./lotus client deal QmSomeData t01000 0.0000000001 80000
```