[crash] fix a segfault using wallet for transfer

Signed-off-by: Leo Chen <leo@harmony.one>
pull/1027/head
Leo Chen 5 years ago
parent 7fb7b828bd
commit 6d070e4d39
  1. 2
      node/node.go

@ -270,7 +270,7 @@ func (node *Node) getTransactionsForNewBlock(maxNumTxs int, coinbase common.Addr
// MaybeKeepSendingPongMessage keeps sending pong message if the current node is a leader. // MaybeKeepSendingPongMessage keeps sending pong message if the current node is a leader.
func (node *Node) MaybeKeepSendingPongMessage() { func (node *Node) MaybeKeepSendingPongMessage() {
if node.Consensus.IsLeader() { if node.Consensus != nil && node.Consensus.IsLeader() {
go node.SendPongMessage() go node.SendPongMessage()
} }
} }

Loading…
Cancel
Save