-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework IPFS Node/API loading along with plugin updates #334
Changes from 11 commits
7fb09d9
8f8837a
da642e2
a5c17db
e7c4c28
d60738b
fe58690
5891bac
cc80cc1
2c13dda
15ab9ef
0bc3263
9bfe2d6
60583ad
4b47034
1f96496
0a92b42
07e2ede
0a7d7dc
d1b1c0a
e68ed79
debfadc
62fea11
e15271a
a55bf10
11d1529
a0f4ae9
c3df6dd
c46e4ba
69b9715
47927cf
f828736
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ import ( | |
"os" | ||
"path/filepath" | ||
"time" | ||
|
||
"github.com/lazyledger/lazyledger-core/ipfs" | ||
) | ||
|
||
const ( | ||
|
@@ -66,7 +68,7 @@ type Config struct { | |
TxIndex *TxIndexConfig `mapstructure:"tx-index"` | ||
Instrumentation *InstrumentationConfig `mapstructure:"instrumentation"` | ||
// Options for IPFS service | ||
IPFS *IPFSConfig `mapstructure:"ipfs"` | ||
IPFS *ipfs.Config `mapstructure:"ipfs"` | ||
} | ||
|
||
// DefaultConfig returns a default configuration for a Tendermint node | ||
|
@@ -81,7 +83,7 @@ func DefaultConfig() *Config { | |
Consensus: DefaultConsensusConfig(), | ||
TxIndex: DefaultTxIndexConfig(), | ||
Instrumentation: DefaultInstrumentationConfig(), | ||
IPFS: DefaultIPFSConfig(), | ||
IPFS: ipfs.DefaultConfig(), | ||
} | ||
} | ||
|
||
|
@@ -108,6 +110,7 @@ func (cfg *Config) SetRoot(root string) *Config { | |
cfg.P2P.RootDir = root | ||
cfg.Mempool.RootDir = root | ||
cfg.Consensus.RootDir = root | ||
cfg.IPFS.RootDir = root | ||
return cfg | ||
} | ||
|
||
|
@@ -841,16 +844,16 @@ func DefaultConsensusConfig() *ConsensusConfig { | |
// TestConsensusConfig returns a configuration for testing the consensus service | ||
func TestConsensusConfig() *ConsensusConfig { | ||
cfg := DefaultConsensusConfig() | ||
cfg.TimeoutPropose = 40 * time.Millisecond | ||
cfg.TimeoutProposeDelta = 1 * time.Millisecond | ||
cfg.TimeoutPrevote = 10 * time.Millisecond | ||
cfg.TimeoutPrevoteDelta = 1 * time.Millisecond | ||
cfg.TimeoutPrecommit = 10 * time.Millisecond | ||
cfg.TimeoutPrecommitDelta = 1 * time.Millisecond | ||
cfg.TimeoutPropose = 100 * time.Millisecond | ||
cfg.TimeoutProposeDelta = 10 * time.Millisecond | ||
cfg.TimeoutPrevote = 40 * time.Millisecond | ||
cfg.TimeoutPrevoteDelta = 10 * time.Millisecond | ||
cfg.TimeoutPrecommit = 40 * time.Millisecond | ||
cfg.TimeoutPrecommitDelta = 10 * time.Millisecond | ||
// NOTE: when modifying, make sure to update time_iota_ms (testGenesisFmt) in toml.go | ||
cfg.TimeoutCommit = 10 * time.Millisecond | ||
cfg.TimeoutCommit = 40 * time.Millisecond | ||
cfg.SkipTimeoutCommit = true | ||
cfg.PeerGossipSleepDuration = 5 * time.Millisecond | ||
cfg.PeerGossipSleepDuration = 10 * time.Millisecond | ||
Comment on lines
-844
to
+856
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. forwarding my comment from #337 for posterity: I just kinda eyeballed these numbers. I have no reasoning for picking the ones I did other than that they were larger than the originals. |
||
cfg.PeerQueryMaj23SleepDuration = 250 * time.Millisecond | ||
cfg.DoubleSignCheckHeight = int64(0) | ||
return cfg | ||
|
@@ -1007,8 +1010,8 @@ func DefaultInstrumentationConfig() *InstrumentationConfig { | |
} | ||
} | ||
|
||
func TetsIpfsConfig() *IPFSConfig { | ||
return DefaultIPFSConfig() | ||
func TetsIpfsConfig() *ipfs.Config { | ||
return ipfs.DefaultConfig() | ||
} | ||
|
||
// TestInstrumentationConfig returns a default configuration for metrics | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is a global var?