Handle wrapping outside the ipfs adder
The ipfs adder does not wrap anymore.
This commit is contained in:
parent
9cd9bce556
commit
2c47585870
|
@ -110,10 +110,8 @@ func (a *Adder) FromFiles(ctx context.Context, f files.Directory) (cid.Cid, erro
|
||||||
return cid.Undef, err
|
return cid.Undef, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// ipfsAdder.Hidden = a.params.Hidden
|
|
||||||
ipfsAdder.Trickle = a.params.Layout == "trickle"
|
ipfsAdder.Trickle = a.params.Layout == "trickle"
|
||||||
ipfsAdder.RawLeaves = a.params.RawLeaves
|
ipfsAdder.RawLeaves = a.params.RawLeaves
|
||||||
// ipfsAdder.Wrap = a.params.Wrap
|
|
||||||
ipfsAdder.Chunker = a.params.Chunker
|
ipfsAdder.Chunker = a.params.Chunker
|
||||||
ipfsAdder.Out = a.output
|
ipfsAdder.Out = a.output
|
||||||
ipfsAdder.Progress = a.params.Progress
|
ipfsAdder.Progress = a.params.Progress
|
||||||
|
@ -133,6 +131,13 @@ func (a *Adder) FromFiles(ctx context.Context, f files.Directory) (cid.Cid, erro
|
||||||
prefix.MhLength = -1
|
prefix.MhLength = -1
|
||||||
ipfsAdder.CidBuilder = &prefix
|
ipfsAdder.CidBuilder = &prefix
|
||||||
|
|
||||||
|
// setup wrapping
|
||||||
|
if a.params.Wrap {
|
||||||
|
f = files.NewSliceDirectory(
|
||||||
|
[]files.DirEntry{files.FileEntry("", f)},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
it := f.Entries()
|
it := f.Entries()
|
||||||
var adderRoot ipld.Node
|
var adderRoot ipld.Node
|
||||||
for it.Next() {
|
for it.Next() {
|
||||||
|
|
|
@ -25,10 +25,9 @@ var (
|
||||||
// These hashes should match all the blocks produced when adding
|
// These hashes should match all the blocks produced when adding
|
||||||
// the files resulting from GetShardingDir*
|
// the files resulting from GetShardingDir*
|
||||||
// They have been obtained by adding the "shardTesting" folder
|
// They have been obtained by adding the "shardTesting" folder
|
||||||
// to go-ipfs (with wrap=true and default parameters). Then doing
|
// to go-ipfs (with default parameters). Then doing
|
||||||
// `refs -r` on the result. It contains the wrapping folder hash.
|
// `refs -r` on the result. It contains the folder hash.
|
||||||
ShardingDirCids = [29]string{
|
ShardingDirCids = [28]string{
|
||||||
"QmbfGRPTUd7L1xsAZZ1A3kUFP1zkEZ9kHdb6AGaajBzGGX",
|
|
||||||
"QmdHXJgxeCFf6qDZqYYmMesV2DbZCVPEdEhj2oVTxP1y7Y",
|
"QmdHXJgxeCFf6qDZqYYmMesV2DbZCVPEdEhj2oVTxP1y7Y",
|
||||||
"QmSpZcKTgfsxyL7nyjzTNB1gAWmGYC2t8kRPpZSG1ZbTkY",
|
"QmSpZcKTgfsxyL7nyjzTNB1gAWmGYC2t8kRPpZSG1ZbTkY",
|
||||||
"QmSijPKAE61CUs57wWU2M4YxkSaRogQxYRtHoEzP2uRaQt",
|
"QmSijPKAE61CUs57wWU2M4YxkSaRogQxYRtHoEzP2uRaQt",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user