@@ -138,18 +138,8 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents, TaikoErrors {
138138 /// @notice Gets the details of a block.
139139 /// @param _blockId Index of the block.
140140 /// @return blk_ The block.
141- /// @return ts_ The transition used to verify this block.
142- function getBlock (uint64 _blockId )
143- public
144- view
145- returns (TaikoData.Block memory blk_ , TaikoData.TransitionState memory ts_ )
146- {
147- uint64 slot;
148- (blk_, slot) = LibUtils.getBlock (state, getConfig (), _blockId);
149-
150- if (blk_.verifiedTransitionId != 0 ) {
151- ts_ = state.transitions[slot][blk_.verifiedTransitionId];
152- }
141+ function getBlock (uint64 _blockId ) public view returns (TaikoData.Block memory blk_ ) {
142+ (blk_,) = LibUtils.getBlock (state, getConfig (), _blockId);
153143 }
154144
155145 /// @notice Gets the state transition for a specific block.
@@ -167,10 +157,25 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents, TaikoErrors {
167157 return LibUtils.getTransition (state, getConfig (), _blockId, _parentHash);
168158 }
169159
160+ /// @notice Gets the state transition for a specific block.
161+ /// @param _blockId Index of the block.
162+ /// @param _tid The transition id.
163+ /// @return The state transition data of the block.
164+ function getTransition (
165+ uint64 _blockId ,
166+ uint32 _tid
167+ )
168+ public
169+ view
170+ returns (TaikoData.TransitionState memory )
171+ {
172+ return LibUtils.getTransition (state, getConfig (), _blockId, _tid);
173+ }
170174 /// @notice Gets the state variables of the TaikoL1 contract.
171175 /// @dev This method can be deleted once node/client stops using it.
172176 /// @return State variables stored at SlotA.
173177 /// @return State variables stored at SlotB.
178+
174179 function getStateVariables ()
175180 public
176181 view
0 commit comments