Merge pull request #382 from filecoin-project/fix/mpool-pending-print

fix output of mpool pending to be usable
This commit is contained in:
Łukasz Magiera 2019-10-16 14:06:53 +02:00 committed by GitHub
commit e598ca0cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
package cli
import (
"encoding/json"
"fmt"
"gopkg.in/urfave/cli.v2"
@ -32,7 +33,11 @@ var mpoolPending = &cli.Command{
}
for _, msg := range msgs {
fmt.Println(msg)
out, err := json.MarshalIndent(msg, "", " ")
if err != nil {
return err
}
fmt.Println(string(out))
}
return nil