@cryptotaxi247 / kubo / commits / bcedd38c9

//hash -> // hash

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Mar 1, 2018 at 23:41 UTC bcedd38c9a6b861a96c48a302989a9c0260de003
3 files changed +6 -6
blockservice/blockservice.go
+3 -3
@@ -155,7 +155,7 @@ func (s *blockService) AddBlock(o blocks.Block) error {
155 }
156
157 func (s *blockService) AddBlocks(bs []blocks.Block) error {
158 - //hash security
158 + // hash security
159 for _, b := range bs {
160 err := verifcid.ValidateCid(b.Cid())
161 if err != nil {
@@ -202,7 +202,7 @@ func (s *blockService) GetBlock(ctx context.Context, c *cid.Cid) (blocks.Block,
202 f = s.exchange
203 }
204
205 - return getBlock(ctx, c, s.blockstore, f) //hash security
205 + return getBlock(ctx, c, s.blockstore, f) // hash security
206 }
207
208 func getBlock(ctx context.Context, c *cid.Cid, bs blockstore.Blockstore, f exchange.Fetcher) (blocks.Block, error) {
@@ -242,7 +242,7 @@ func getBlock(ctx context.Context, c *cid.Cid, bs blockstore.Blockstore, f excha
242 // the returned channel.
243 // NB: No guarantees are made about order.
244 func (s *blockService) GetBlocks(ctx context.Context, ks []*cid.Cid) <-chan blocks.Block {
245 - return getBlocks(ctx, ks, s.blockstore, s.exchange) //hash security
245 + return getBlocks(ctx, ks, s.blockstore, s.exchange) // hash security
246 }
247
248 func getBlocks(ctx context.Context, ks []*cid.Cid, bs blockstore.Blockstore, f exchange.Fetcher) <-chan blocks.Block {
core/builder.go
+2 -2
@@ -15,9 +15,9 @@ import (
15 dag "github.com/ipfs/go-ipfs/merkledag"
16 resolver "github.com/ipfs/go-ipfs/path/resolver"
17 pin "github.com/ipfs/go-ipfs/pin"
18 - "github.com/ipfs/go-ipfs/thirdparty/verifbs"
18 repo "github.com/ipfs/go-ipfs/repo"
19 cfg "github.com/ipfs/go-ipfs/repo/config"
20 + "github.com/ipfs/go-ipfs/thirdparty/verifbs"
21 uio "github.com/ipfs/go-ipfs/unixfs/io"
22
23 ds "gx/ipfs/QmPpegoMqhAEqjncrzArm7KVWAkCm78rqL2DPuNjhPrshg/go-datastore"
@@ -171,7 +171,7 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
171 TempErrFunc: isTooManyFDError,
172 }
173
174 - //hash security
174 + // hash security
175 bs := bstore.NewBlockstore(rds)
176 bs = &verifbs.VerifBS{bs}
177
core/commands/add.go
+1 -1
@@ -258,7 +258,7 @@ You can now check what blocks have been created by:
258 exch = offline.Exchange(addblockstore)
259 }
260
261 - bserv := blockservice.New(addblockstore, exch) //hash security 001
261 + bserv := blockservice.New(addblockstore, exch) // hash security 001
262 dserv := dag.NewDAGService(bserv)
263
264 outChan := make(chan interface{}, adderOutChanSize)