# gossip **Repository Path**: tuerqidi/gossip ## Basic Information - **Project Name**: gossip - **Description**: 区块链学习,简易账本实现 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-08-17 - **Last Updated**: 2024-04-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gossip #### 介绍 区块链学习,简易账本实现。 先上效果截图 区块信息 ![](https://oscimg.oschina.net/oscnet/up-5af23898fccdb4b11fb5e221f2e3dc39cc1.png) 钱包信息 ![](https://oscimg.oschina.net/oscnet/up-2df96843fb320886901ae074e7e2e97f221.png) #### 使用说明 1. 新建data存储目录dataDir, windows dataDir = "D:\\ds\\data\\"; unix或者linux或者macOS dataDir = "/opt/ds/data"; 然后启动程序(需安装jdk1.8) 2. 创建创世区块 genesis block 3. 输出区块信息 printChain 4. 创建钱包1 add wallet name 5. 创建钱包2 add wallet name1 6. 使用钱包1,挖第一笔矿 packNext 这个属于投机行为,不打包任何的交易,在比特币的出块记录中也有这样的行为 7. 查看钱包1的信息 收据1条 billFlow 8. 输出区块信息 printChain 9. 使用钱包1给钱包2转账 pay xxxaddress 10 10. 使用钱包1,挖第二笔矿 packNext 打包1笔交易 11. 输出区块信息 printChain 12. 查看钱包1的信息 收据2条 支付记录1条 billFlow 13. 切换钱包2 switch wallet name1 14. 查看钱包2的信息 收据1条 billFlow