mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-30 14:41:20 +00:00
fast sync status
This commit is contained in:
parent
05c0dfac12
commit
6f8d385dfa
@ -267,11 +267,6 @@ func (bcR *BlockchainReactor) SetEventSwitch(evsw types.EventSwitch) {
|
|||||||
bcR.evsw = evsw
|
bcR.evsw = evsw
|
||||||
}
|
}
|
||||||
|
|
||||||
// FastSync returns whether the blockchain reactor is currently fast syncing
|
|
||||||
func (bcR *BlockchainReactor) FastSync() bool {
|
|
||||||
return bcR.fastSync
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Messages
|
// Messages
|
||||||
|
|
||||||
|
@ -290,6 +290,11 @@ func (conR *ConsensusReactor) SetEventSwitch(evsw types.EventSwitch) {
|
|||||||
conR.conS.SetEventSwitch(evsw)
|
conR.conS.SetEventSwitch(evsw)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FastSync returns whether the consensus reactor is currently fast syncing
|
||||||
|
func (conR *ConsensusReactor) FastSync() bool {
|
||||||
|
return conR.fastSync
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
|
|
||||||
// Listens for new steps and votes,
|
// Listens for new steps and votes,
|
||||||
|
@ -315,7 +315,7 @@ func (n *Node) ConfigureRPC() {
|
|||||||
rpccore.SetAddrBook(n.addrBook)
|
rpccore.SetAddrBook(n.addrBook)
|
||||||
rpccore.SetProxyAppQuery(n.proxyApp.Query())
|
rpccore.SetProxyAppQuery(n.proxyApp.Query())
|
||||||
rpccore.SetTxIndexer(n.txIndexer)
|
rpccore.SetTxIndexer(n.txIndexer)
|
||||||
rpccore.SetBlockchainReactor(n.bcReactor)
|
rpccore.SetConsensusReactor(n.consensusReactor)
|
||||||
rpccore.SetLogger(n.Logger.With("module", "rpc"))
|
rpccore.SetLogger(n.Logger.With("module", "rpc"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package core
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
"github.com/tendermint/tendermint/blockchain"
|
|
||||||
"github.com/tendermint/tendermint/consensus"
|
"github.com/tendermint/tendermint/consensus"
|
||||||
p2p "github.com/tendermint/tendermint/p2p"
|
p2p "github.com/tendermint/tendermint/p2p"
|
||||||
"github.com/tendermint/tendermint/proxy"
|
"github.com/tendermint/tendermint/proxy"
|
||||||
@ -46,7 +45,7 @@ var (
|
|||||||
genDoc *types.GenesisDoc // cache the genesis structure
|
genDoc *types.GenesisDoc // cache the genesis structure
|
||||||
addrBook *p2p.AddrBook
|
addrBook *p2p.AddrBook
|
||||||
txIndexer txindex.TxIndexer
|
txIndexer txindex.TxIndexer
|
||||||
bcReactor *blockchain.BlockchainReactor
|
consensusReactor *consensus.ConsensusReactor
|
||||||
|
|
||||||
logger log.Logger
|
logger log.Logger
|
||||||
)
|
)
|
||||||
@ -91,8 +90,8 @@ func SetTxIndexer(indexer txindex.TxIndexer) {
|
|||||||
txIndexer = indexer
|
txIndexer = indexer
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetBlockchainReactor(bc *blockchain.BlockchainReactor) {
|
func SetConsensusReactor(conR *consensus.ConsensusReactor) {
|
||||||
bcReactor = bc
|
consensusReactor = conR
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetLogger(l log.Logger) {
|
func SetLogger(l log.Logger) {
|
||||||
|
@ -28,5 +28,5 @@ func Status() (*ctypes.ResultStatus, error) {
|
|||||||
LatestAppHash: latestAppHash,
|
LatestAppHash: latestAppHash,
|
||||||
LatestBlockHeight: latestHeight,
|
LatestBlockHeight: latestHeight,
|
||||||
LatestBlockTime: latestBlockTime,
|
LatestBlockTime: latestBlockTime,
|
||||||
Syncing: bcReactor.FastSync()}, nil
|
Syncing: consensusReactor.FastSync()}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user