add mpool pending command

This commit is contained in:
whyrusleeping
2019-07-10 12:20:16 -07:00
parent 999b7d568c
commit e09a379c3b
6 changed files with 51 additions and 3 deletions
+1
View File
@@ -30,6 +30,7 @@ type API interface {
// // status
// // mpool
// // // ls / show / rm
MpoolPending(context.Context) ([]*chain.SignedMessage, error)
// dag
+7 -1
View File
@@ -4,8 +4,8 @@ import (
"context"
"github.com/filecoin-project/go-lotus/chain"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
)
@@ -18,12 +18,18 @@ type Struct struct {
ChainSubmitBlock func(ctx context.Context, blk *chain.BlockMsg) error
ChainHead func(context.Context) ([]cid.Cid, error)
MpoolPending func(ctx context.Context) ([]*chain.SignedMessage, error)
NetPeers func(context.Context) ([]peer.AddrInfo, error)
NetConnect func(context.Context, peer.AddrInfo) error
NetAddrsListen func(context.Context) (peer.AddrInfo, error)
}
}
func (c *Struct) MpoolPending(ctx context.Context) ([]*chain.SignedMessage, error) {
return c.Internal.MpoolPending(ctx)
}
func (c *Struct) NetPeers(ctx context.Context) ([]peer.AddrInfo, error) {
return c.Internal.NetPeers(ctx)
}