Skip to content

Commit 34fd07a

Browse files
replace unused @classmethod with @staticmethod
1 parent 04922eb commit 34fd07a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

eth2/beacon/db/chain.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ def _get_finalized_head(cls,
302302
finalized_head_root = cls._get_finalized_head_root(db)
303303
return cls._get_block_by_root(db, Hash32(finalized_head_root), block_class)
304304

305-
@classmethod
306-
def _get_finalized_head_root(cls, db: BaseDB) -> Hash32:
305+
@staticmethod
306+
def _get_finalized_head_root(db: BaseDB) -> Hash32:
307307
try:
308308
finalized_head_root = db[SchemaV1.make_finalized_head_root_lookup_key()]
309309
except KeyError:
@@ -323,8 +323,8 @@ def _get_justified_head(cls,
323323
justified_head_root = cls._get_justified_head_root(db)
324324
return cls._get_block_by_root(db, Hash32(justified_head_root), block_class)
325325

326-
@classmethod
327-
def _get_justified_head_root(cls, db: BaseDB) -> Hash32:
326+
@staticmethod
327+
def _get_justified_head_root(db: BaseDB) -> Hash32:
328328
try:
329329
justified_head_root = db[SchemaV1.make_justified_head_root_lookup_key()]
330330
except KeyError:
@@ -405,9 +405,8 @@ def persist_block_chain(
405405
with self.db.atomic_batch() as db:
406406
return self._persist_block_chain(db, blocks, block_class)
407407

408-
@classmethod
408+
@staticmethod
409409
def _set_block_scores_to_db(
410-
cls,
411410
db: BaseDB,
412411
block: BaseBeaconBlock
413412
) -> int:

0 commit comments

Comments
 (0)