remove v1 and v2 blocksync protocol impementations (#9146)

This commit is contained in:
Callum Waters
2022-08-16 11:06:10 +02:00
committed by Sam Ricotta
parent fac7143098
commit 7e4faf598c
38 changed files with 78 additions and 9755 deletions
+2 -4
View File
@@ -897,10 +897,8 @@ func (cfg *FastSyncConfig) ValidateBasic() error {
switch cfg.Version {
case "v0":
return nil
case "v1":
return nil
case "v2":
return nil
case "v1", "v2":
return fmt.Errorf("fast sync version %s has been deprecated. Please use v0 instead", cfg.Version)
default:
return fmt.Errorf("unknown fastsync version %s", cfg.Version)
}
+1 -1
View File
@@ -134,7 +134,7 @@ func TestFastSyncConfigValidateBasic(t *testing.T) {
// tamper with version
cfg.Version = "v1"
assert.NoError(t, cfg.ValidateBasic())
assert.Error(t, cfg.ValidateBasic())
cfg.Version = "invalid"
assert.Error(t, cfg.ValidateBasic())
+5 -3
View File
@@ -434,9 +434,11 @@ chunk_fetchers = "{{ .StateSync.ChunkFetchers }}"
[fastsync]
# Fast Sync version to use:
# 1) "v0" (default) - the legacy fast sync implementation
# 2) "v1" - refactor of v0 version for better testability
# 2) "v2" - complete redesign of v0, optimized for testability & readability
#
# In v0.37, v1 and v2 of the fast sync protocol were deprecated.
# Please use v0 instead.
#
# 1) "v0" - the default fast sync implementation
version = "{{ .FastSync.Version }}"
#######################################################