config: cswal_light, mempool_broadcast, mempool_reap

This commit is contained in:
Ethan Buchman
2016-03-03 06:31:59 +00:00
parent 69d906f7dd
commit 3891e4d66d
12 changed files with 51 additions and 7 deletions
+4
View File
@@ -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()
+4
View File
@@ -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() {