[lbry] Enable specifying claimtrie implmentation.
Note: switching between implementation require rebuilding the claimtrie from scratch.
This commit is contained in:
parent
82d4b6657b
commit
b23710bc33
1 changed files with 10 additions and 0 deletions
10
server.go
10
server.go
|
@ -2736,7 +2736,17 @@ func newServer(listenAddrs, agentBlacklist, agentWhitelist []string,
|
|||
case "none":
|
||||
// Disable ClaimTrie for development purpose.
|
||||
lbryLog.Infof("ClaimTrie is disabled")
|
||||
case "persistent":
|
||||
claimTrieCfg.RamTrie = false
|
||||
lbryLog.Infof("ClaimTrie uses Persistent implementation")
|
||||
case "ram", "":
|
||||
claimTrieCfg.RamTrie = true
|
||||
lbryLog.Infof("ClaimTrie uses RamTrie implementation")
|
||||
default:
|
||||
lbryLog.Errorf("ClaimTrie uses Unknown implementation")
|
||||
}
|
||||
|
||||
if cfg.ClaimTrieImpl != "none" {
|
||||
ct, err = claimtrie.New(claimTrieCfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Reference in a new issue