forked from TrueCloudLab/frostfs-node
[#506] container: Use uint64 for epoch type
It is `uint64` in netmap source interfaces and other code. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
f04806ccd3
commit
a952a406a2
2 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ type DelInfo struct {
|
||||||
Owner user.ID
|
Owner user.ID
|
||||||
|
|
||||||
// Epoch indicates when the container was removed.
|
// Epoch indicates when the container was removed.
|
||||||
Epoch int
|
Epoch uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source is an interface that wraps
|
// Source is an interface that wraps
|
||||||
|
|
|
@ -63,13 +63,13 @@ func (c *Client) DeletionInfo(cid []byte) (*containercore.DelInfo, error) {
|
||||||
return nil, fmt.Errorf("could not decode container owner id (%s): %w", deletionInfoMethod, err)
|
return nil, fmt.Errorf("could not decode container owner id (%s): %w", deletionInfoMethod, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
epoch, err := client.IntFromStackItem(arr[1])
|
epoch, err := client.BigIntFromStackItem(arr[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not get byte array of container signature (%s): %w", deletionInfoMethod, err)
|
return nil, fmt.Errorf("could not get byte array of container signature (%s): %w", deletionInfoMethod, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &containercore.DelInfo{
|
return &containercore.DelInfo{
|
||||||
Owner: owner,
|
Owner: owner,
|
||||||
Epoch: int(epoch),
|
Epoch: epoch.Uint64(),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue