コード例 #1
0
 def _get_account(self, address):
     rlp_account = self._journaltrie.get(address, b'')
     if rlp_account:
         account = rlp.decode(rlp_account, sedes=Account)
     else:
         account = Account()
     return account
コード例 #2
0
ファイル: state.py プロジェクト: gitter-badger/py-evm
 def _get_account(self, address):
     if address in self.state:
         account = rlp.decode(self.state[address], sedes=Account)
         account._mutable = True
     else:
         account = Account()
     return account
コード例 #3
0
ファイル: state.py プロジェクト: thomaslu3/py-evm
 def _get_account(self, address):
     rlp_account = self._trie[address]
     if rlp_account:
         account = rlp.decode(rlp_account, sedes=Account)
         account._mutable = True
     else:
         account = Account()
     return account
コード例 #4
0
    def _get_account(self, address):
        cache_key = (id(self._unwrapped_db), self.state_root, address)
        if cache_key not in account_cache:
            account_cache[cache_key] = self._trie[address]

        rlp_account = account_cache[cache_key]
        if rlp_account:
            account = rlp.decode(rlp_account, sedes=Account)
        else:
            account = Account()
        return account
コード例 #5
0
ファイル: state.py プロジェクト: you77520/py-evm
    def _get_account(self, address):
        cache_key = (self._unwrapped_db, self.root_hash, address)
        if cache_key not in account_cache:
            account_cache[cache_key] = self._trie[address]

        rlp_account = account_cache[cache_key]
        if rlp_account:
            account = rlp.decode(rlp_account, sedes=Account)
            account._mutable = True
        else:
            account = Account()
        return account
コード例 #6
0
ファイル: state.py プロジェクト: thomaslu3/py-evm
 def touch_account(self, address):
     if not self.account_exists(address):
         self._set_account(address, Account())