Make message wait work and use it for the storage-miner init

This commit is contained in:
whyrusleeping
2019-07-29 11:58:30 -07:00
parent fa5e27d7b9
commit 0c67d66198
9 changed files with 71 additions and 23 deletions
+2
View File
@@ -9,6 +9,7 @@ import (
"github.com/ipfs/go-filestore"
exchange "github.com/ipfs/go-ipfs-exchange-interface"
bserv "github.com/ipfs/go-blockservice"
"github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"
ipld "github.com/ipfs/go-ipld-format"
@@ -190,6 +191,7 @@ func Online() Option {
Override(new(blockstore.GCLocker), blockstore.NewGCLocker),
Override(new(blockstore.GCBlockstore), blockstore.NewGCBlockstore),
Override(new(exchange.Interface), modules.Bitswap),
Override(new(bserv.BlockService), bserv.New),
Override(new(ipld.DAGService), testing.MemoryClientDag),
// Filecoin services
+4 -1
View File
@@ -68,7 +68,7 @@ func (a *FullNodeAPI) ChainWaitMsg(ctx context.Context, msg cid.Cid) (*api.MsgWa
return &api.MsgWait{
InBlock: blkcid,
Receipt: recpt,
Receipt: *recpt,
}, nil
}
@@ -96,6 +96,9 @@ func (a *FullNodeAPI) MpoolPush(ctx context.Context, smsg *types.SignedMessage)
if err != nil {
return err
}
if err := a.Mpool.Add(smsg); err != nil {
return err
}
return a.PubSub.Publish("/fil/messages", msgb)
}