In blockchain, the consensus algorithm is a core component that governs the trust among the participants in the blockchain activities. However, the exiting consensus algorithms suffer from performance bottleneck such as low throughput, high delay, unstable performance, sustainability issues and vulnerability to targeted attacks. In this paper, we propose a new consortium blockchain consensus algorithm, referred to as Weighted Byzantine Fault Tolerance (WBFT) consensus algorithm that improves system throughput and consensus delay. We introduce a dynamic weighting mechanism for consensus nodes, which enhances the security of blockchain system by weakening the influence of malicious nodes and reduces the probability of malicious behavior. We validate the performance of WBFT experimentally and compare it against Practical Byzantine Fault Tolerance (PBFT) and Reputation-Based Byzantine Fault-Tolerance (RBFT) based approaches. The results show that WBFT substantially outperforms PBFT and RBFT in terms of system throughput, consensus delay and security.