// A client represent a entity/user which send transactions and receive responses from the harmony network
// A client represent a node (e.g. wallet) which sends transactions and receive responses from the harmony network
typeClientstruct{
PendingCrossTxsmap[[32]byte]*blockchain.Transaction// map of TxId to pending cross shard txs
PendingCrossTxsMutexsync.Mutex
leaders*[]p2p.Peer
UpdateBlocksfunc([]*blockchain.Block)// func used to sync blocks with the leader
PendingCrossTxsmap[[32]byte]*blockchain.Transaction// Map of TxId to pending cross shard txs. Pending means the proof-of-accept/rejects are not complete
PendingCrossTxsMutexsync.Mutex// Mutex for the pending txs list
leaders*[]p2p.Peer// All the leaders for each shard
UpdateBlocksfunc([]*blockchain.Block)// Closure function used to sync new block with the leader. Once the leader finishes the consensus on a new block, it will send it to the clients. Clients use this method to update their blockchain
loglog.Logger// Log utility
}
// The message handler for CLIENT/TRANSACTION messages.