Node.js实现简单区块链
Node.js实现简单区块链
1.blockchain.js
const SHA256 = require('crypto-js/sha256');
class Block {
// 构造函数
constructor(index, timestamp) {
this.index = index;
this.timestamp = timestamp;
this.transactions = [];
this.previousHash = '';
this.h
原创
2020-10-09 14:51:00 ·
1389 阅读 ·
0 评论