@@ -100,6 +100,7 @@ def calc_difficulty(parent, timestamp):
100
100
101
101
102
102
class Account (rlp .Serializable ):
103
+
103
104
"""An Ethereum account.
104
105
105
106
:ivar nonce: the account's nonce (the number of transactions sent by the
@@ -172,6 +173,7 @@ def bloom(self):
172
173
173
174
174
175
class BlockHeader (rlp .Serializable ):
176
+
175
177
"""A block header.
176
178
177
179
If the block with this header exists as an instance of :class:`Block`, the
@@ -306,7 +308,7 @@ def hex_hash(self):
306
308
@property
307
309
def mining_hash (self ):
308
310
return utils .sha3 (rlp .encode (self ,
309
- BlockHeader .exclude (['mixhash' , 'nonce' ])))
311
+ BlockHeader .exclude (['mixhash' , 'nonce' ])))
310
312
311
313
@property
312
314
def seed (self ):
@@ -405,6 +407,7 @@ def setter(self, value):
405
407
set (['state_root' , 'receipts_root' , 'tx_list_root' ]),
406
408
only_getters = False )
407
409
class Block (rlp .Serializable ):
410
+
408
411
"""A block.
409
412
410
413
All attributes from the block header are accessible via properties
@@ -563,7 +566,7 @@ def must_le(what, a, b):
563
566
"database" % self )
564
567
if (not self .is_genesis () and self .nonce and not self .header .check_pow ()):
565
568
raise ValueError ("PoW check failed" )
566
- self .db .put ('validated:' + self .hash , '1' )
569
+ self .db .put ('validated:' + self .hash , '1' )
567
570
568
571
@classmethod
569
572
def init_from_header (cls , header_rlp , db ):
@@ -1351,7 +1354,7 @@ def get_block(db, blockhash):
1351
1354
return CachedBlock .create_cached (blk )
1352
1355
1353
1356
1354
- #def has_block(blockhash):
1357
+ # def has_block(blockhash):
1355
1358
# return blockhash in db.DB(utils.get_db_path())
1356
1359
1357
1360
0 commit comments