mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-05-28 03:59:27 +00:00
Fixes possible crash in market averages
This commit is contained in:
parent
3fb1b212b6
commit
5ed78da30b
@ -42,6 +42,7 @@ namespace TestNetRewarder
|
||||
private ChainState[] SelectStates(int numberOfIntervals)
|
||||
{
|
||||
if (numberOfIntervals < 1) return Array.Empty<ChainState>();
|
||||
if (numberOfIntervals > buffer.Count) return Array.Empty<ChainState>();
|
||||
return buffer.TakeLast(numberOfIntervals).ToArray();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user