Skip to content

Commit

Permalink
fix: Handle Babbage and Conway era protocol parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
satran004 committed Jan 18, 2024
1 parent b953135 commit e9eb81d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public DataItem serialize(AcceptVersion protocolVersion) {

@Override
public CurrentProtocolParamQueryResult deserializeResult(AcceptVersion protocolVersion, DataItem[] di) {
var dataItemList = ((Array)di[0]).getDataItems();
List<DataItem> paramsDIList = ((Array) extractResultArray(di[0]).get(0)).getDataItems();

if (protocolVersion.getVersionNumber() < PROTOCOL_V14 || protocolVersion.getVersionNumber() == PROTOCOL_V15) {
return deserializeResultTillV13(di);
} else { //V14, V16 and above
if (dataItemList.size() == 23) //Till Babbage
if (paramsDIList.size() == 23) //Till Babbage
return deserializeResultTillV13(di);
else
return deserializeResult(di);
Expand Down

0 comments on commit e9eb81d

Please sign in to comment.