config: cswal_light, mempool_broadcast, mempool_reap

This commit is contained in:
Ethan Buchman
2016-03-01 16:04:19 -05:00
parent 69d906f7dd
commit 3891e4d66d
12 changed files with 51 additions and 7 deletions

View File

@@ -328,7 +328,7 @@ func (cs *ConsensusState) OnStop() {
func (cs *ConsensusState) OpenWAL(file string) (err error) {
cs.mtx.Lock()
defer cs.mtx.Unlock()
wal, err := NewWAL(file)
wal, err := NewWAL(file, config.GetBool("cswal_light"))
if err != nil {
return err
}
@@ -655,7 +655,6 @@ func (cs *ConsensusState) handleMsg(mi msgInfo, rs RoundState) {
err = cs.setProposal(msg.Proposal)
case *BlockPartMessage:
// if the proposal is complete, we'll enterPrevote or tryFinalizeCommit
// if we're the only validator, the enterPrevote may take us through to the next round
_, err = cs.addProposalBlockPart(msg.Height, msg.Part)
case *VoteMessage:
// attempt to add the vote and dupeout the validator if its a duplicate signature
@@ -675,7 +674,7 @@ func (cs *ConsensusState) handleMsg(mi msgInfo, rs RoundState) {
log.Warn("Unknown msg type", reflect.TypeOf(msg))
}
if err != nil {
log.Error("Error with msg", "type", reflect.TypeOf(msg), "error", err, "msg", msg)
log.Error("Error with msg", "type", reflect.TypeOf(msg), "peer", peerKey, "error", err, "msg", msg)
}
}