mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 23:32:16 +00:00
AbstractBlockChain: Fix median timestamp calculation.
Resolves issue 370.
This commit is contained in:
parent
3d6691c82a
commit
a78b53c5aa
@ -495,7 +495,7 @@ public abstract class AbstractBlockChain {
|
||||
while (unused >= 0 && (storedBlock = storedBlock.getPrev(store)) != null)
|
||||
timestamps[unused--] = storedBlock.getHeader().getTimeSeconds();
|
||||
|
||||
Arrays.sort(timestamps, unused+1, 10);
|
||||
Arrays.sort(timestamps, unused+1, 11);
|
||||
return timestamps[unused + (11-unused)/2];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user