• Daniel Martí's avatar
    blockstore: stop embedding ReadOnly in ReadWrite · 3752fdb3
    Daniel Martí authored
    It has unintended side effects, as we leak the inner ReadOnly value as
    well as its methods to the parent ReadWrite API.
    
    One unintended consequence is that it was possible to "close" a
    ReadWrite, when we only wanted to support finalizing it.
    
    The resumption tests do want to close without finalization,
    for the sake of emulating partially-written CARv2 files.
    Those can hook into the unexported API via export_test.go.
    
    If a downstream really wants to support closing a ReadWrite blockstore
    without finalizing it, two alternatives are outlined in export_test.go.
    3752fdb3
export_test.go 478 Bytes