Skip to content

Commit

Permalink
change from array of authoriries to list of authorities
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigorov-Georgi committed Jan 15, 2025
1 parent 39c71c7 commit 20435f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/limechain/grandpa/state/RoundState.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public boolean handleAuthoritySetChange(BigInteger blockNumber) {
break;
}

startNewSet(Arrays.asList(changeSetData.getAuthorities()));
startNewSet(changeSetData.getAuthorities());
authoritySetChanges.poll();
updated = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.limechain.chain.lightsyncstate.Authority;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigInteger;
Expand All @@ -11,15 +10,14 @@

@Getter
@Setter
@NoArgsConstructor
public class AuthoritySetChange {

private Authority[] authorities;
private List<Authority> authorities;
private Long delay;
private BigInteger applicationBlock;

public AuthoritySetChange(List<Authority> authorities, Long delay, BigInteger announceBlock) {
this.authorities = authorities.toArray(new Authority[0]);
this.authorities = authorities;
this.delay = delay;
this.applicationBlock = announceBlock.add(BigInteger.valueOf(delay));
}
Expand Down

0 comments on commit 20435f1

Please sign in to comment.