ipfsclient: Add some docs
This commit is contained in:
parent
0d4bf2e980
commit
a0bdf95845
@ -28,7 +28,7 @@ var mpoolPending = &cli.Command{
|
|||||||
Usage: "Get pending messages",
|
Usage: "Get pending messages",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "local",
|
Name: "local",
|
||||||
Usage: "print pending messages for addresses in local wallet only",
|
Usage: "print pending messages for addresses in local wallet only",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -61,7 +61,7 @@ var mpoolPending = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, msg := range msgs {
|
for _, msg := range msgs {
|
||||||
if filter != nil{
|
if filter != nil {
|
||||||
if _, has := filter[msg.Message.From]; !has {
|
if _, has := filter[msg.Message.From]; !has {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ var mpoolStat = &cli.Command{
|
|||||||
Usage: "print mempool stats",
|
Usage: "print mempool stats",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "local",
|
Name: "local",
|
||||||
Usage: "print stats for addresses in local wallet only",
|
Usage: "print stats for addresses in local wallet only",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -163,7 +163,7 @@ var mpoolStat = &cli.Command{
|
|||||||
buckets := map[address.Address]*statBucket{}
|
buckets := map[address.Address]*statBucket{}
|
||||||
|
|
||||||
for _, v := range msgs {
|
for _, v := range msgs {
|
||||||
if filter != nil{
|
if filter != nil {
|
||||||
if _, has := filter[v.Message.From]; !has {
|
if _, has := filter[v.Message.From]; !has {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,12 @@
|
|||||||
"slug": "en+info-for-miners",
|
"slug": "en+info-for-miners",
|
||||||
"github": "en/miner-deals.md",
|
"github": "en/miner-deals.md",
|
||||||
"value": null
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "IPFS Integration",
|
||||||
|
"slug": "en+ipfs-client-integration",
|
||||||
|
"github": "en/storing-ipfs-integration.md",
|
||||||
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -55,7 +55,6 @@ Check the status of a deal:
|
|||||||
lotus client list-deals
|
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.
|
- 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**.
|
Upon success, this command will return a **Deal CID**.
|
||||||
|
18
documentation/en/storing-ipfs-integration.md
Normal file
18
documentation/en/storing-ipfs-integration.md
Normal 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
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user