Function
ContextAddUpdate
(ctx context.Context, update WaveObjUpdate)
Source from the content-addressed store, hash-verified
| 72 | } |
| 73 | |
| 74 | func ContextAddUpdate(ctx context.Context, update WaveObjUpdate) { |
| 75 | updatesVal := ctx.Value(waveObjUpdateKey) |
| 76 | if updatesVal == nil { |
| 77 | return |
| 78 | } |
| 79 | updates := updatesVal.(*contextUpdatesType) |
| 80 | oref := ORef{ |
| 81 | OType: update.OType, |
| 82 | OID: update.OID, |
| 83 | } |
| 84 | updates.UpdatesStack[len(updates.UpdatesStack)-1][oref] = update |
| 85 | } |
| 86 | |
| 87 | func ContextUpdatesBeginTx(ctx context.Context) context.Context { |
| 88 | updatesVal := ctx.Value(waveObjUpdateKey) |
Tested by
no test coverage detected