Add more logs for aws debugging

pull/69/head
Rongjian Lan 6 years ago
parent 95878c2ae2
commit c9a54e1784
  1. 1
      client/client.go
  2. 3
      client/txgen/main.go
  3. 3
      consensus/consensus_validator.go
  4. 15
      node/node_handler.go

@ -61,6 +61,7 @@ func (client *Client) handleProofOfLockMessage(proofs *[]blockchain.CrossShardTx
//fmt.Printf("PENDING CLIENT TX - %d\n", len(client.PendingCrossTxs))
// Loop through the newly received list of proofs
client.PendingCrossTxsMutex.Lock()
log.Info("CLIENT PENDING TX", "num", len(client.PendingCrossTxs))
for _, proof := range *proofs {
// Find the corresponding pending cross tx
txAndProofs, ok := client.PendingCrossTxs[proof.TxID]

@ -128,8 +128,7 @@ UTXOLOOP:
}
}
}
//fmt.Printf("UTXO CLIENT - %d\n", shardId)
//fmt.Println(dataNodes[shardId].UtxoPool.CountNumOfUtxos())
log.Info("UTXO CLIENT", "numUtxo", dataNodes[shardId].UtxoPool.CountNumOfUtxos(), "shardId", shardId)
utxoPoolMutex.Unlock()
log.Debug("[Generator] generated transations", "single-shard", len(txInfo.txs), "cross-shard", len(txInfo.crossTxs))
return txInfo.txs, txInfo.crossTxs

@ -47,6 +47,7 @@ func (consensus *Consensus) ProcessMessageValidator(message []byte, blockSyncing
// Processes the announce message sent from the leader
func (consensus *Consensus) processAnnounceMessage(payload []byte) {
consensus.Log.Info("Received Announce Message")
//#### Read payload data
offset := 0
// 4 byte consensus id
@ -71,6 +72,8 @@ func (consensus *Consensus) processAnnounceMessage(payload []byte) {
offset += 64
//#### END: Read payload data
consensus.Log.Info("Received Announce Message", "LeaderId", leaderId)
copy(consensus.blockHash[:], blockHash[:])
// Verify block data

@ -367,14 +367,9 @@ func (node *Node) UpdateUtxoAndState(newBlock *blockchain.Block) {
}
// Clear transaction-in-Consensus list
node.transactionInConsensus = []*blockchain.Transaction{}
//if node.Consensus.IsLeader {
// fmt.Printf("TX in New BLOCK - %d %s\n", node.UtxoPool.ShardID, newBlock.IsStateBlock())
// //fmt.Println(newBlock.Transactions)
// fmt.Printf("LEADER CURRENT UTXO - %d\n", node.UtxoPool.ShardID)
// fmt.Println(node.UtxoPool.CountNumOfUtxos())
// fmt.Println(node.UtxoPool)
// fmt.Printf("LEADER LOCKED UTXO - %d\n", node.UtxoPool.ShardID)
// fmt.Println(node.UtxoPool.CountNumOfLockedUtxos())
// fmt.Println(node.UtxoPool.StringOfLockedUtxos())
//}
if node.Consensus.IsLeader {
node.log.Info("TX in New BLOCK", "num", len(newBlock.Transactions), "ShardId", node.UtxoPool.ShardID, "IsStateBlock", newBlock.IsStateBlock())
node.log.Info("LEADER CURRENT UTXO", "num", node.UtxoPool.CountNumOfUtxos(), "ShardId", node.UtxoPool.ShardID)
node.log.Info("LEADER LOCKED UTXO", "num", node.UtxoPool.CountNumOfLockedUtxos(), "ShardId", node.UtxoPool.ShardID)
}
}

Loading…
Cancel
Save