Skip to content

Commit 7ed29f9

Browse files
committed
morph: completely remove fallbackTime from client cfg
It's unused and not needed, default fallback lifetime is set by Notary actor. Signed-off-by: Anna Shaleva <anna@nspcc.ru>
1 parent 2ac6ace commit 7ed29f9

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Changelog for NeoFS Node
1414
- Inner ring node panic on exit if internal CN is not enabled (#2308)
1515

1616
### Removed
17+
- FallbackTime Morph client configuration option (#2310)
1718

1819
### Updated
1920

pkg/morph/client/notary.go

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ import (
3030

3131
type (
3232
notaryInfo struct {
33-
txValidTime uint32 // minimum amount of blocks when mainTx will be valid
34-
roundTime uint32 // extra amount of blocks to synchronize sidechain height diff of inner ring nodes
35-
fallbackTime uint32 // mainTx's ValidUntilBlock - fallbackTime + 1 is when fallbackTx is sent
33+
txValidTime uint32 // minimum amount of blocks when mainTx will be valid
34+
roundTime uint32 // extra amount of blocks to synchronize sidechain height diff of inner ring nodes
3635

3736
alphabetSource AlphabetKeys // source of alphabet node keys to prepare witness
3837

@@ -43,7 +42,7 @@ type (
4342
notaryCfg struct {
4443
proxy util.Uint160
4544

46-
txValidTime, roundTime, fallbackTime uint32
45+
txValidTime, roundTime uint32
4746

4847
alphabetSource AlphabetKeys
4948
}
@@ -53,9 +52,8 @@ type (
5352
)
5453

5554
const (
56-
defaultNotaryValidTime = 50
57-
defaultNotaryRoundTime = 100
58-
defaultNotaryFallbackTime = 40
55+
defaultNotaryValidTime = 50
56+
defaultNotaryRoundTime = 100
5957

6058
notaryBalanceOfMethod = "balanceOf"
6159
notaryExpirationOfMethod = "expirationOf"
@@ -71,7 +69,6 @@ func defaultNotaryConfig(c *Client) *notaryCfg {
7169
return &notaryCfg{
7270
txValidTime: defaultNotaryValidTime,
7371
roundTime: defaultNotaryRoundTime,
74-
fallbackTime: defaultNotaryFallbackTime,
7572
alphabetSource: c.Committee,
7673
}
7774
}
@@ -106,7 +103,6 @@ func (c *Client) EnableNotarySupport(opts ...NotaryOption) error {
106103
proxy: cfg.proxy,
107104
txValidTime: cfg.txValidTime,
108105
roundTime: cfg.roundTime,
109-
fallbackTime: cfg.fallbackTime,
110106
alphabetSource: cfg.alphabetSource,
111107
notary: notary.Hash,
112108
}
@@ -674,15 +670,6 @@ func WithRoundTime(t uint32) NotaryOption {
674670
}
675671
}
676672

677-
// WithFallbackTime returns a notary support option for client
678-
// that specifies amount of blocks before fallbackTx will be sent.
679-
// Should be less than TxValidTime.
680-
func WithFallbackTime(t uint32) NotaryOption {
681-
return func(c *notaryCfg) {
682-
c.fallbackTime = t
683-
}
684-
}
685-
686673
// WithAlphabetSource returns a notary support option for client
687674
// that specifies function to return list of alphabet node keys.
688675
// By default notary subsystem uses committee as a source. This is

0 commit comments

Comments
 (0)