[#35] Add snapshot method for morph/netmap client

With snapshot method node can get previous network
maps from previous epoch.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-09-22 11:09:45 +03:00
parent c410b23c97
commit 92fb384c09
2 changed files with 53 additions and 9 deletions

View file

@ -34,6 +34,7 @@ type cfg struct {
addPeerMethod, // add peer method name for invocation
newEpochMethod, // new epoch method name for invocation
netMapMethod, // get network map method name
snapshotMethod, // get network map snapshot method name
updateStateMethod, // update state method name for invocation
innerRingListMethod string // IR list method name for invocation
}
@ -42,6 +43,7 @@ const (
defaultAddPeerMethod = "addPeer" // default add peer method name
defaultNewEpochMethod = "newEpoch" // default new epoch method name
defaultNetMapMethod = "netmap" // default get network map method name
defaultSnapshotMethod = "snapshot" // default get network map snapshot method name
defaultUpdateStateMethod = "updateState" // default update state method name
defaultInnerRIngListMethod = "innerRingList" // default IR list method name
)
@ -51,6 +53,7 @@ func defaultConfig() *cfg {
addPeerMethod: defaultAddPeerMethod,
newEpochMethod: defaultNewEpochMethod,
netMapMethod: defaultNetMapMethod,
snapshotMethod: defaultSnapshotMethod,
updateStateMethod: defaultUpdateStateMethod,
innerRingListMethod: defaultInnerRIngListMethod,
}