diff --git a/blockchain/utxopool.go b/blockchain/utxopool.go index 4b4e9e62c..4f4c8df97 100644 --- a/blockchain/utxopool.go +++ b/blockchain/utxopool.go @@ -248,8 +248,6 @@ func (utxoPool *UTXOPool) UpdateOneTransaction(tx *Transaction) { } } } // If it's a cross shard locking Tx, then don't update so the input UTXOs are locked (removed), and the money is not spendable until unlock-to-commit or unlock-to-abort - - // TODO: unlock-to-commit and unlock-to-abort } } diff --git a/consensus/consensus_leader.go b/consensus/consensus_leader.go index 135fd2a14..27e10aed4 100644 --- a/consensus/consensus_leader.go +++ b/consensus/consensus_leader.go @@ -168,16 +168,14 @@ func (consensus *Consensus) processCommitMessage(payload []byte) { } if len(consensus.commits) >= (2*len(consensus.validators))/3+1 && consensus.state < CHALLENGE_DONE { - if len(consensus.commits) >= (2*len(consensus.validators))/3+1 && consensus.state < CHALLENGE_DONE { - consensus.Log.Debug("Enough commits received with signatures", "numOfSignatures", len(consensus.commits)) + consensus.Log.Debug("Enough commits received with signatures", "numOfSignatures", len(consensus.commits)) - // Broadcast challenge - msgToSend := consensus.constructChallengeMessage() - p2p.BroadcastMessage(consensus.validators, msgToSend) + // Broadcast challenge + msgToSend := consensus.constructChallengeMessage() + p2p.BroadcastMessage(consensus.validators, msgToSend) - // Set state to CHALLENGE_DONE - consensus.state = CHALLENGE_DONE - } + // Set state to CHALLENGE_DONE + consensus.state = CHALLENGE_DONE } } diff --git a/node/node_handler.go b/node/node_handler.go index 94ffc7d51..a4eaaac72 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -244,7 +244,7 @@ func (node *Node) SendBackProofOfAcceptOrReject() { } // This is called by consensus leader to sync new blocks with other clients/nodes. -// For now, just send to the client. +// NOTE: For now, just send to the client (basically not broadcasting) func (node *Node) BroadcastNewBlock(newBlock *blockchain.Block) { if node.ClientPeer != nil { node.log.Debug("SENDING NEW BLOCK TO CLIENT")