cachecontext comments and changelog update
This commit is contained in:
+4
-3
@@ -22,7 +22,6 @@ next decorator or handler. For example,
|
||||
...
|
||||
}
|
||||
*/
|
||||
|
||||
type Context struct {
|
||||
context.Context
|
||||
pst *thePast
|
||||
@@ -172,9 +171,11 @@ func (c Context) WithTxBytes(txBytes []byte) Context {
|
||||
return c.withValue(contextKeyTxBytes, txBytes)
|
||||
}
|
||||
|
||||
func (c Context) CacheContext() (Context, func()) {
|
||||
// Cache the multistore and return a new cached context. The cached context is
|
||||
// written to the context when writeCache is called.
|
||||
func (c Context) CacheContext() (cc Context, writeCache func()) {
|
||||
cms := c.multiStore().CacheMultiStore()
|
||||
cc := c.WithMultiStore(cms)
|
||||
cc = c.WithMultiStore(cms)
|
||||
return cc, cms.Write
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user