forked from TrueCloudLab/frostfs-contract
[#33] netmap: Do not save ballots for invalid epoch
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
76f5943c14
commit
6abe334676
1 changed files with 5 additions and 0 deletions
|
@ -219,6 +219,11 @@ func NewEpoch(epochNum int) bool {
|
||||||
panic("newEpoch: this method must be invoked by inner ring nodes")
|
panic("newEpoch: this method must be invoked by inner ring nodes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentEpoch := storage.Get(ctx, snapshotEpoch).(int)
|
||||||
|
if epochNum <= currentEpoch {
|
||||||
|
return false // ignore invocations with invalid epoch
|
||||||
|
}
|
||||||
|
|
||||||
data0snapshot := getSnapshot(ctx, snapshot0Key)
|
data0snapshot := getSnapshot(ctx, snapshot0Key)
|
||||||
dataOnlineState := filterNetmap(ctx, onlineState)
|
dataOnlineState := filterNetmap(ctx, onlineState)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue