Electronic device and method for packaging blocks of blockchain
摘要:
A method for packaging blocks of a blockchain implemented in an electronic device. The method identifies whether a packaged block is valid, and extracts from a header of valid packaged block geographic location information of the submitting blockchain node. A mining difficulty of the electronic device is calculated according to the geographic location information of the electronic device and the blockchain node, and a random number is generated. A hash value is calculated according to the random number and a determination made as to whether the calculated hash value conforms to the mining difficulty. If the calculated hash value is determined to conform to the mining difficulty, the geographic location information of the electronic device is encoded into a new block and the new block is written into the blockchain.
信息查询
0/0