A blockchain can be taken as a decentralized and distributed public database. In order to achieve data consistency of the system nodes, the execution of a consensus algorithm is necessary and required in the case of decentralized environments. Simply speaking, the consensus is that every node agrees on some record in the blockchain. There are many kinds of consensus algorithms in blockchain environments, and each consensus algorithm has its own proper application scenario. Here we firstly analysis and compare various popular consensus algorithms in blockchain environments, and then as voting theory has systematically studied the decision-making in a group, the traditional methods of voting theory is summarized and listed, including (Position) scoring rules, Copeland, Maximin, Ranked pairs, Voting trees, Bucklin, Plurality with runoff, Single transferable vote, Baldwin rule, and Nanson rule. Finally, we introduce the voting methods from voting theory to consensus algorithms in the blockchain to improve its performance.