returnfmt.Errorf("error writing data to sink: %w",err)
}
returnsink.Close()
}
// Release implements raft.FSMSnapshot.
// We don't really need to do anything within Release as the snapshot is not gonna change after creation, and we don't hold any reference to closable resources.
func(s*snapshot)Release(){}
// unsafeHeadData wraps the execution payload with the block version, and provides ease of use interfaces to marshal/unmarshal it.