Refactor and replace getByBlockNumber by getByBlockHeader (#5171)

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
This commit is contained in:
Gabriel Fukushima
2023-03-10 14:49:08 +11:00
committed by GitHub
parent 192c0bb651
commit 62f4a51191

View File

@@ -47,12 +47,6 @@ public class ScheduleBasedBlockHeaderFunctions implements BlockHeaderFunctions {
}
private BlockHeaderFunctions getBlockHeaderFunctions(final SealableBlockHeader header) {
if (protocolSchedule instanceof ProtocolSchedule) {
return ((ProtocolSchedule) protocolSchedule)
.getByBlockNumber(header.getNumber())
.getBlockHeaderFunctions();
} else {
return protocolSchedule.getByBlockHeader(header).getBlockHeaderFunctions();
}
return protocolSchedule.getByBlockHeader(header).getBlockHeaderFunctions();
}
}