简单理解区块链知识
package com.redis.testRedis; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.alibaba.fastjson.JSON; public class BlockChain { public static void main(String[] args) { List blockChainList = new ArrayList(); Block genesis = new Block("BlockChain", 0); blockChainList.add(genesis); Block helloBlock = new Block("Hello", blockChainList.get(blockChainList.size()-1).getHash()); blockChainList.add(helloBlock); Block worldBlock = new Block("World", blockChainList.get(blockChainList.size()-1).getHash()); blockChainList.add(worldBlock); Block dZoneBlock = new Block("DZone", blockChainList.get(blockChainList.size()-1).getHash()); blockChainList.add(dZoneBlock); System.out.println("---------------------"); System.out.println("- BlockChain -"); System.out.println("---------------------&