Exemplo n.º 1
0
 def ephemeral_clone(self):
     snapshot = self.to_snapshot(root_only=True, no_prevblocks=True)
     env2 = Env(OverlayDb(self.db), self.env.config)
     s = State.from_snapshot(snapshot, env2)
     for param in STATE_DEFAULTS:
         setattr(s, param, getattr(self, param))
     s.recent_uncles = self.recent_uncles
     s.prev_headers = self.prev_headers
     for acct in self.cache.values():
         assert not acct.touched or not acct.deleted
     s.journal = copy.copy(self.journal)
     s.cache = {}
     return s
Exemplo n.º 2
0
 def ephemeral_clone(self):
     snapshot = self.to_snapshot(no_prevblocks=True)
     env2 = Env(OverlayDb(self.db), self.env.config)
     s = State.from_snapshot(snapshot, env2)
     for param in STATE_DEFAULTS:
         setattr(s, param, getattr(self, param))
     s.prev_headers = self.prev_headers
     for acct in self.cache.values():
         assert not acct.touched or not acct.deleted
     s.journal = copy.copy(self.journal)
     s.cache = {}
     s.qkc_config = self.qkc_config
     s.sender_disallow_map = self.sender_disallow_map
     return s