aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_object.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/state_object.go')
-rw-r--r--ethchain/state_object.go29
1 files changed, 2 insertions, 27 deletions
diff --git a/ethchain/state_object.go b/ethchain/state_object.go
index 617646077..b38ee4f5c 100644
--- a/ethchain/state_object.go
+++ b/ethchain/state_object.go
@@ -160,33 +160,8 @@ func (c *StateObject) RlpDecode(data []byte) {
c.script = decoder.Get(3).Bytes()
}
-// The cached state and state object cache are helpers which will give you somewhat
-// control over the nonce. When creating new transactions you're interested in the 'next'
-// nonce rather than the current nonce. This to avoid creating invalid-nonce transactions.
-type StateObjectCache struct {
- cachedObjects map[string]*CachedStateObject
-}
-
-func NewStateObjectCache() *StateObjectCache {
- return &StateObjectCache{cachedObjects: make(map[string]*CachedStateObject)}
-}
-
-func (s *StateObjectCache) Add(addr []byte, object *StateObject) *CachedStateObject {
- state := &CachedStateObject{Nonce: object.Nonce, Object: object}
- s.cachedObjects[string(addr)] = state
-
- return state
-}
-
-func (s *StateObjectCache) Get(addr []byte) *CachedStateObject {
- return s.cachedObjects[string(addr)]
-}
-
-type CachedStateObject struct {
- Nonce uint64
- Object *StateObject
-}
-
+// Storage change object. Used by the manifest for notifying changes to
+// the sub channels.
type StorageState struct {
StateAddress []byte
Address []byte