Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 19f562e

Browse files
vubvub
authored andcommitted
Merge branch 'develop' of github.com:ethereum/pyethereum into develop
2 parents 186b00c + d8bf433 commit 19f562e

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[run]
22
source = pyethereum
33

4-
To exclude parts of your source from coverage, for example migrations folders:
5-
64
[report]
75
omit =
86
*/fixtures/*

ethereum/blocks.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,14 @@ class Receipt(rlp.Serializable):
116116
]
117117

118118
def __init__(self, state_root, gas_used, logs, bloom=None):
119+
# does not call super.__init__ as bloom should not be an attribute but a property
119120
self.state_root = state_root
120121
self.gas_used = gas_used
121122
self.logs = logs
122123
if bloom is not None and bloom != self.bloom:
123124
raise ValueError("Invalid bloom filter")
125+
self._cached_rlp = None
126+
self._mutable = True
124127

125128
@property
126129
def bloom(self):
@@ -426,11 +429,11 @@ def __init__(self, header, transaction_list=[], uncles=[], env=None,
426429
'difficulty': header.difficulty,
427430
'uncles_hash': header.uncles_hash,
428431
'bloom': header.bloom,
429-
'header_mutable': self.header.mutable_,
432+
'header_mutable': self.header._mutable,
430433
}
431-
assert self.mutable_
432-
self.rlp_ = None
433-
self.header.mutable_ = True
434+
assert self._mutable
435+
self._cached_rlp = None
436+
self.header._mutable = True
434437

435438
self.transactions = Trie(self.db, trie.BLANK_ROOT)
436439
self.receipts = Trie(self.db, trie.BLANK_ROOT)
@@ -496,7 +499,7 @@ def must_le(what, a, b):
496499

497500
# from now on, trie roots refer to block instead of header
498501
header.block = self
499-
self.header.mutable_ = original_values['header_mutable']
502+
self.header._mutable = original_values['header_mutable']
500503

501504
# Basic consistency verifications
502505
if not self.check_fields():
@@ -692,8 +695,8 @@ def _get_acct(self, address):
692695
rlpdata = self.state.get(address)
693696
if rlpdata != trie.BLANK_NODE:
694697
acct = rlp.decode(rlpdata, Account, db=self.db)
695-
acct.mutable_ = True
696-
acct.rlp_ = None
698+
acct._mutable = True
699+
acct._cached_rlp = None
697700
else:
698701
acct = Account.blank_account(self.db)
699702
return acct

ethereum/tester.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@ def snapshot(self):
270270

271271
def revert(self, data):
272272
self.block = rlp.decode(data, b.Block, env=self.env)
273-
self.block.mutable_ = True
274-
self.block.header.mutable_ = True
275-
self.block.rlp_ = None
276-
self.block.header.rlp_ = None
273+
self.block._mutable = True
274+
self.block.header._mutable = True
275+
self.block._cached_rlp = None
276+
self.block.header._cached_rlp = None
277277

278278
# logging
279279

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def run_tests(self):
3232
# requirements
3333
install_requires = set(x.strip() for x in open('requirements.txt'))
3434
install_requires_replacements = {
35-
'https://github.com/ethereum/pyrlp/tarball/develop': 'rlp>=0.3.8',
35+
'https://github.com/ethereum/pyrlp/tarball/develop': 'rlp>=0.3.9',
3636
'https://github.com/ethereum/ethash/tarball/master': 'pyethash'}
3737
install_requires = [install_requires_replacements.get(r, r) for r in install_requires]
3838

@@ -51,6 +51,6 @@ def run_tests(self):
5151
install_requires=install_requires,
5252
tests_require=tests_require,
5353
entry_points=dict(console_scripts=console_scripts),
54-
version='1.0.2',
54+
version='1.0.3',
5555
cmdclass=cmdclass
5656
)

0 commit comments

Comments
 (0)