File tree Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,6 @@ def get_canonical_block_by_slot(self,
92
92
block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
93
93
pass
94
94
95
- @abstractmethod
96
- def get_canonical_block_root_by_slot (self , slot : int ) -> Hash32 :
97
- pass
98
-
99
95
@abstractmethod
100
96
def get_canonical_head (self , block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
101
97
pass
@@ -263,26 +259,9 @@ def _get_canonical_block_by_slot(
263
259
db : BaseDB ,
264
260
slot : int ,
265
261
block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
266
- canonical_block_root = cls ._get_canonical_block_root_by_slot (db , slot )
262
+ canonical_block_root = cls ._get_canonical_block_root (db , slot )
267
263
return cls ._get_block_by_root (db , canonical_block_root , block_class )
268
264
269
- def get_canonical_block_root_by_slot (self , slot : int ) -> Hash32 :
270
- """
271
- Return the block root with the given slot in the canonical chain.
272
-
273
- Raise BlockNotFound if there's no block with the given slot in the
274
- canonical chain.
275
- """
276
- return self ._get_canonical_block_root_by_slot (self .db , slot )
277
-
278
- @classmethod
279
- def _get_canonical_block_root_by_slot (
280
- cls ,
281
- db : BaseDB ,
282
- slot : int ) -> Hash32 :
283
- validate_slot (slot )
284
- return cls ._get_canonical_block_root (db , slot )
285
-
286
265
def get_canonical_head (self , block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
287
266
"""
288
267
Return the current block at the head of the chain.
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ class FakeAsyncBeaconChainDB(BaseAsyncBeaconChainDB, BeaconChainDB):
46
46
coro_persist_block = async_passthrough ('persist_block' )
47
47
coro_get_canonical_block_root = async_passthrough ('get_canonical_block_root' )
48
48
coro_get_canonical_block_by_slot = async_passthrough ('get_canonical_block_by_slot' )
49
- coro_get_canonical_block_root_by_slot = async_passthrough ('get_canonical_block_root_by_slot' )
50
49
coro_get_canonical_head = async_passthrough ('get_canonical_head' )
51
50
coro_get_canonical_head_root = async_passthrough ('get_canonical_head_root' )
52
51
coro_get_finalized_head = async_passthrough ('get_finalized_head' )
Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ async def coro_get_canonical_block_by_slot(
55
55
block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
56
56
pass
57
57
58
- @abstractmethod
59
- async def coro_get_canonical_block_root_by_slot (self , slot : int ) -> Hash32 :
60
- pass
61
-
62
58
@abstractmethod
63
59
async def coro_get_canonical_head (self , block_class : Type [BaseBeaconBlock ]) -> BaseBeaconBlock :
64
60
pass
@@ -126,7 +122,6 @@ class AsyncBeaconChainDBPreProxy(BaseAsyncBeaconChainDB):
126
122
coro_persist_block = async_method ('persist_block' )
127
123
coro_get_canonical_block_root = async_method ('get_canonical_block_root' )
128
124
coro_get_canonical_block_by_slot = async_method ('get_canonical_block_by_slot' )
129
- coro_get_canonical_block_root_by_slot = async_method ('get_canonical_block_root_by_slot' )
130
125
coro_get_canonical_head = async_method ('get_canonical_head' )
131
126
coro_get_canonical_head_root = async_method ('get_canonical_head_root' )
132
127
coro_get_finalized_head = async_method ('get_finalized_head' )
You can’t perform that action at this time.
0 commit comments