make state diffing work with partial state trees
This commit is contained in:
parent
89b88c1e0d
commit
16243b97aa
@ -233,8 +233,13 @@ func writeStateToTempCAR(bs blockstore.Blockstore, roots ...cid.Cid) (string, er
|
|||||||
if link.Cid.Prefix().Codec == cid.FilCommitmentSealed || link.Cid.Prefix().Codec == cid.FilCommitmentUnsealed {
|
if link.Cid.Prefix().Codec == cid.FilCommitmentSealed || link.Cid.Prefix().Codec == cid.FilCommitmentUnsealed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// ignore things we don't have, the state tree is incomplete.
|
||||||
|
if has, err := bs.Has(link.Cid); err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if has {
|
||||||
out = append(out, link)
|
out = append(out, link)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user