message: state-surgery: safer memorydb
  Do not overwrite accounts that already exist when
  creating accounts with the memory db. Also panic
  if trying to set state in an account that doesn't
  yet exist in the state.
diff: @@ -60,6 +60,7 @@ func (db *MemoryStateDB) CreateAccount(addr common.Address) {
  db.rw.Lock()
  defer db.rw.Unlock()
  + if _, ok := db.genesis.Alloc[addr]; !ok {
  db.genesis.Alloc[addr] = core.GenesisAccount{
  Code: []byte{},
  Storage: make(map[common.Hash]common.Hash),
  @@ -68,6 +69,8 @@ func (db *MemoryStateDB) CreateAccount(addr common.Address) {
  }
  }
  +}
  +
  func (db *MemoryStateDB) SubBalance(addr common.Address, amount *big.Int) {
  db.rw.Lock()
  defer db.rw.Unlock()
  @@ -216,7 +219,7 @@ func (db *MemoryStateDB) SetState(addr common.Address, key, value common.Hash) {
  account, ok := db.genesis.Alloc[addr]
  if !ok {
  - return
  + panic(fmt.Sprintf("%s not in state", addr))
  }
  account.Storage[key] = value
  db.genesis.Alloc[addr] = account
  