Skip to content

Commit

Permalink
fix empty sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
KickSeason committed Nov 2, 2020
1 parent d2a326a commit b700b94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ECPoint[] GetDesignatedByRole(StoreView snapshot, Role role, uint index)
byte[] boundary = CreateStorageKey((byte)role).ToArray();
return snapshot.Storages.FindRange(key, boundary, SeekDirection.Backward)
.Select(u => u.Value.GetInteroperable<NodeList>().ToArray())
.First() ?? System.Array.Empty<ECPoint>();
.FirstOrDefault() ?? System.Array.Empty<ECPoint>();
}

[ContractMethod(0, CallFlags.AllowModifyStates)]
Expand Down

0 comments on commit b700b94

Please sign in to comment.