mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
thread metrics through to block and state store constructors in node pacakge
This commit is contained in:
+11
-6
@@ -146,21 +146,26 @@ func NewNode(config *cfg.Config,
|
||||
logger log.Logger,
|
||||
options ...Option,
|
||||
) (*Node, error) {
|
||||
blockStore, stateDB, err := initDBs(config, dbProvider)
|
||||
blockStoreDB, stateDB, err := initDBs(config, dbProvider)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
|
||||
DiscardABCIResponses: config.Storage.DiscardABCIResponses,
|
||||
})
|
||||
|
||||
state, genDoc, err := LoadStateFromDBOrGenesisDocProvider(stateDB, genesisDocProvider)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
csMetrics, p2pMetrics, memplMetrics, smMetrics, abciMetrics, bsMetrics, ssMetrics := metricsProvider(genDoc.ChainID)
|
||||
csMetrics, p2pMetrics, memplMetrics, smMetrics, bstMetrics, abciMetrics, bsMetrics, ssMetrics := metricsProvider(genDoc.ChainID)
|
||||
|
||||
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
|
||||
DiscardABCIResponses: config.Storage.DiscardABCIResponses,
|
||||
Metrics: smMetrics,
|
||||
})
|
||||
|
||||
blockStore := store.NewBlockStore(blockStoreDB, store.BlockStoreOptions{
|
||||
Metrics: bstMetrics,
|
||||
})
|
||||
|
||||
// Create the proxyApp and establish connections to the ABCI app (consensus, mempool, query).
|
||||
proxyApp, err := createAndStartProxyAppConns(clientCreator, logger, abciMetrics)
|
||||
|
||||
Reference in New Issue
Block a user