blockchain: rename to blocksync service (#6755)

This commit is contained in:
Callum Waters
2022-08-15 19:06:53 -04:00
committed by William Banfield
parent cbc7a1abcf
commit 844b46ff1a
24 changed files with 333 additions and 149 deletions
+3 -2
View File
@@ -88,8 +88,9 @@ type ManifestNode struct {
// runner will wait for the network to reach at least this block height.
StartAt int64 `toml:"start_at"`
// FastSync specifies whether to enable the fast sync protocol.
FastSync bool `toml:"fast_sync"`
// BlockSync specifies the block sync mode: "" (disable), "v0" or "v2".
// Defaults to disabled.
BlockSync string `toml:"block_sync"`
// Mempool specifies which version of mempool to use. Either "v0" or "v1"
// This defaults to v0.
+7 -2
View File
@@ -72,7 +72,7 @@ type Node struct {
IP net.IP
ProxyPort uint32
StartAt int64
FastSync bool
BlockSync string
StateSync bool
Mempool string
Database string
@@ -155,7 +155,7 @@ func LoadTestnet(file string) (*Testnet, error) {
ABCIProtocol: Protocol(testnet.ABCIProtocol),
PrivvalProtocol: ProtocolFile,
StartAt: nodeManifest.StartAt,
FastSync: nodeManifest.FastSync,
BlockSync: nodeManifest.BlockSync,
Mempool: nodeManifest.Mempool,
StateSync: nodeManifest.StateSync,
PersistInterval: 1,
@@ -297,6 +297,11 @@ func (n Node) Validate(testnet Testnet) error {
}
}
}
switch n.BlockSync {
case "v0":
default:
return fmt.Errorf("invalid block sync setting %q", n.BlockSync)
}
switch n.Mempool {
case "", "v0", "v1":
default: