We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbd9569 commit 96a03d4Copy full SHA for 96a03d4
dag/leaves.go
@@ -451,7 +451,18 @@ func (leaf *DagLeaf) VerifyRootLeaf(dag *Dag) error {
451
}
452
453
454
- if isFullDag {
+ // If any leaf has a content hash but the content field is empty, we can't verify size
455
+ hasContentMissing := false
456
+ if isFullDag && dag != nil {
457
+ for _, l := range dag.Leafs {
458
+ if len(l.ContentHash) > 0 && l.Content == nil {
459
+ hasContentMissing = true
460
+ break
461
+ }
462
463
464
+
465
+ if isFullDag && !hasContentMissing {
466
for _, dagLeaf := range dag.Leafs {
467
if dagLeaf.Content != nil {
468
calculatedContentSize += int64(len(dagLeaf.Content))
0 commit comments