From 27c193dd866c4900af90452bd896a8427b8bc01c Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sat, 25 Apr 2015 13:50:29 -0700 Subject: [PATCH] Error message in RebondTx so we know why it's failing. --- consensus/state.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/consensus/state.go b/consensus/state.go index e2fde2ebc..ff9cbc637 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -534,8 +534,14 @@ func (cs *ConsensusState) updateToState(state *sm.State, contiguous bool) { } err := cs.privValidator.SignRebondTx(rebondTx) if err == nil { - log.Info("Signed and broadcast RebondTx", "height", cs.Height, "round", cs.Round, "tx", rebondTx) - cs.mempoolReactor.BroadcastTx(rebondTx) + err := cs.mempoolReactor.BroadcastTx(rebondTx) + if err != nil { + log.Error("Failed to broadcast RebondTx", + "height", cs.Height, "round", cs.Round, "tx", rebondTx, "error", err) + } else { + log.Info("Signed and broadcast RebondTx", + "height", cs.Height, "round", cs.Round, "tx", rebondTx) + } } else { log.Warn("Error signing RebondTx", "height", cs.Height, "round", cs.Round, "tx", rebondTx, "error", err) }