diff --git a/client/client.go b/client/client.go index 07c60083b..7ec150183 100644 --- a/client/client.go +++ b/client/client.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] diff --git a/client/txgen/main.go b/client/txgen/main.go index e77567a91..becc2aef5 100644 --- a/client/txgen/main.go +++ b/client/txgen/main.go @@ -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 diff --git a/consensus/consensus_validator.go b/consensus/consensus_validator.go index 8b2e2ee58..57bd4b399 100644 --- a/consensus/consensus_validator.go +++ b/consensus/consensus_validator.go @@ -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 diff --git a/go_executable_build.sh b/go_executable_build.sh index 44efb6146..ac425020a 100755 --- a/go_executable_build.sh +++ b/go_executable_build.sh @@ -10,7 +10,7 @@ BINDIR=bin BUCKET=unique-bucket-bin GOOS=linux GOARCH=amd64 -FOLDER=/$(whoami) +FOLDER=/${WHOAMI:-$USER} function usage { diff --git a/node/node_handler.go b/node/node_handler.go index d26428631..5aa4549fc 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -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) + } }