Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 25, 2024
1 parent 8f70cbf commit 9aab13c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/services/object/put/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func (t *distributedTarget) Close() (oid.ID, error) {
default:
}

t.currentEpochDuration = 240

Check warning on line 154 in pkg/services/object/put/distributed.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/object/put/distributed.go#L154

Added line #L154 was not covered by tests
expectedVUB := (uint64(t.currentBlock)/t.currentEpochDuration + 2) * t.currentEpochDuration
t.objSharedMeta = object.EncodeReplicationMetaInfo(t.obj.GetContainerID(), t.obj.GetID(), t.obj.PayloadSize(), deletedObjs,
lockedObjs, expectedVUB, t.networkMagicNumber)
Expand Down
3 changes: 3 additions & 0 deletions pkg/services/object/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,9 @@ func (s *server) metaInfoSignature(o object.Object) ([]byte, error) {

currentBlock := s.fsChain.CurrentBlock()
currentEpochDuration := s.fsChain.CurrentEpochDuration()
if currentEpochDuration == 0 {
currentEpochDuration = 240
}

Check warning on line 2052 in pkg/services/object/server.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/object/server.go#L2051-L2052

Added lines #L2051 - L2052 were not covered by tests
firstBlock := (uint64(currentBlock)/currentEpochDuration + 1) * currentEpochDuration
secondBlock := firstBlock + currentEpochDuration
thirdBlock := secondBlock + currentEpochDuration
Expand Down

0 comments on commit 9aab13c

Please sign in to comment.