Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save spikeekips/51fabda7e78b36d51570ad9ac39b97c2 to your computer and use it in GitHub Desktop.

Select an option

Save spikeekips/51fabda7e78b36d51570ad9ac39b97c2 to your computer and use it in GitHub Desktop.

Revisions

  1. spikeekips created this gist Sep 13, 2023.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    diff --git isaac/block/localfs_writer.go isaac/block/localfs_writer.go
    index 9bdfa2b9..d963da88 100644
    --- isaac/block/localfs_writer.go
    +++ isaac/block/localfs_writer.go
    @@ -146,6 +146,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri
    func(ctx context.Context, _ uint64) error {
    _ = w.opsf.Close()

    + if l := atomic.LoadUint64(&w.lenops); l > 0 {
    if err := w.m.SetItem(NewLocalBlockMapItem(
    base.BlockMapItemTypeOperations,
    w.opsf.Checksum(),
    @@ -153,6 +154,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri
    )); err != nil {
    return errors.Wrap(err, "set operations")
    }
    + }

    return nil
    },