Open anorth opened 4 years ago
For a counterpoint, @icorderi argues that the cbor.IpldStore interface the HAMT/AMT interfaces need should not require the Go context as a parameter (but it should be connected deeper down). In that case, we would not need to expose the Go context in the runtime at all.
This would certainly be nice, but it's not canonical use of the Go context.
Do not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it.
@whyrusleeping as our HAMT/AMT contact, do you have an opinion here? (cc @frrist )
The adt.Store runtime wrapper drops the context from the method signature when adapting to the cbor store interface. While it's possible for it to be hooked up behind the runtime, it would be more straightfoward to simply use the context already provided.