Moved seeding and moved manifest
This commit is contained in:
@ -331,36 +331,3 @@ func (sm *StateManager) notifyChanges() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type Manifest struct {
|
||||
// XXX These will be handy in the future. Not important for now.
|
||||
objectAddresses map[string]bool
|
||||
storageAddresses map[string]map[string]bool
|
||||
|
||||
objectChanges map[string]*StateObject
|
||||
storageChanges map[string]map[string]*big.Int
|
||||
}
|
||||
|
||||
func NewManifest() *Manifest {
|
||||
m := &Manifest{objectAddresses: make(map[string]bool), storageAddresses: make(map[string]map[string]bool)}
|
||||
m.Reset()
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (m *Manifest) Reset() {
|
||||
m.objectChanges = make(map[string]*StateObject)
|
||||
m.storageChanges = make(map[string]map[string]*big.Int)
|
||||
}
|
||||
|
||||
func (m *Manifest) AddObjectChange(stateObject *StateObject) {
|
||||
m.objectChanges[string(stateObject.Address())] = stateObject
|
||||
}
|
||||
|
||||
func (m *Manifest) AddStorageChange(stateObject *StateObject, storageAddr []byte, storage *big.Int) {
|
||||
if m.storageChanges[string(stateObject.Address())] == nil {
|
||||
m.storageChanges[string(stateObject.Address())] = make(map[string]*big.Int)
|
||||
}
|
||||
|
||||
m.storageChanges[string(stateObject.Address())][string(storageAddr)] = storage
|
||||
}
|
||||
|
Reference in New Issue
Block a user