move Blockstore config to FullNode, rename to Chainstore and add default for HotStoreType
This commit is contained in:
+15
-17
@@ -12,19 +12,19 @@ import (
|
||||
|
||||
// Common is common config between full node and miner
|
||||
type Common struct {
|
||||
API API
|
||||
Libp2p Libp2p
|
||||
Pubsub Pubsub
|
||||
Blockstore Blockstore
|
||||
API API
|
||||
Libp2p Libp2p
|
||||
Pubsub Pubsub
|
||||
}
|
||||
|
||||
// FullNode is a full node config
|
||||
type FullNode struct {
|
||||
Common
|
||||
Client Client
|
||||
Metrics Metrics
|
||||
Wallet Wallet
|
||||
Fees FeeConfig
|
||||
Client Client
|
||||
Metrics Metrics
|
||||
Wallet Wallet
|
||||
Fees FeeConfig
|
||||
Chainstore Chainstore
|
||||
}
|
||||
|
||||
// // Common
|
||||
@@ -120,7 +120,7 @@ type Pubsub struct {
|
||||
RemoteTracer string
|
||||
}
|
||||
|
||||
type Blockstore struct {
|
||||
type Chainstore struct {
|
||||
EnableSplitstore bool
|
||||
Splitstore Splitstore
|
||||
}
|
||||
@@ -134,14 +134,6 @@ type Splitstore struct {
|
||||
Archival bool
|
||||
}
|
||||
|
||||
func (s *Splitstore) GetHotStoreType() string {
|
||||
// default is badger
|
||||
if s.HotStoreType == "" {
|
||||
return "badger"
|
||||
}
|
||||
return s.HotStoreType
|
||||
}
|
||||
|
||||
// // Full Node
|
||||
|
||||
type Metrics struct {
|
||||
@@ -207,6 +199,12 @@ func DefaultFullNode() *FullNode {
|
||||
Client: Client{
|
||||
SimultaneousTransfers: DefaultSimultaneousTransfers,
|
||||
},
|
||||
Chainstore: Chainstore{
|
||||
EnableSplitstore: false,
|
||||
Splitstore: Splitstore{
|
||||
HotStoreType: "badger",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user