Skip to content

Commit

Permalink
corner case around transition protocol
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Jan 12, 2023
1 parent 18d336d commit a080bff
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public ParsedExtraData parseExtraData(final BlockHeader header) {
}

private BlockHeaderFunctions getBlockHeaderFunctions(final SealableBlockHeader header) {
return protocolSchedule.getByBlockHeader(header).getBlockHeaderFunctions();
if (protocolSchedule instanceof ProtocolSchedule) {
return ((ProtocolSchedule) protocolSchedule)
.getByBlockNumber(header.getNumber())
.getBlockHeaderFunctions();
} else {
return protocolSchedule.getByBlockHeader(header).getBlockHeaderFunctions();
}
}
}

0 comments on commit a080bff

Please sign in to comment.