mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-21 14:46:15 +00:00
config: cswal_light, mempool_broadcast, mempool_reap
This commit is contained in:
@@ -184,6 +184,10 @@ func (mem *Mempool) resCbRecheck(req *tmsp.Request, res *tmsp.Response) {
|
||||
|
||||
// Get the valid transactions remaining
|
||||
func (mem *Mempool) Reap() []types.Tx {
|
||||
if !config.GetBool("mempool_reap") {
|
||||
return []types.Tx{}
|
||||
}
|
||||
|
||||
mem.proxyMtx.Lock()
|
||||
defer mem.proxyMtx.Unlock()
|
||||
|
||||
|
||||
@@ -101,6 +101,10 @@ type Peer interface {
|
||||
// TODO: Handle mempool or reactor shutdown?
|
||||
// As is this routine may block forever if no new txs come in.
|
||||
func (memR *MempoolReactor) broadcastTxRoutine(peer Peer) {
|
||||
if !config.GetBool("mempool_broadcast") {
|
||||
return
|
||||
}
|
||||
|
||||
var next *clist.CElement
|
||||
for {
|
||||
if !memR.IsRunning() {
|
||||
|
||||
Reference in New Issue
Block a user