[#234] core/netmap: Extend Source interface

Add GetNetMapByEpoch method. Add Epoch method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-12 17:42:00 +03:00 committed by Alex Vanin
parent 1d56e60589
commit 2f4d90025f
2 changed files with 18 additions and 1 deletions

View file

@ -12,12 +12,14 @@ type netMapBuilder struct {
}
type netMapSrc struct {
netmap.Source
nm *netmapSDK.Netmap
}
func NewNetworkMapBuilder(nm *netmapSDK.Netmap) Builder {
return &netMapBuilder{
nmSrc: &netMapSrc{nm},
nmSrc: &netMapSrc{nm: nm},
}
}