-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-test.js
More file actions
25 lines (19 loc) · 719 Bytes
/
dev-test.js
File metadata and controls
25 lines (19 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const Block = require('./blockchain/block');
const Blockchain = require('./blockchain/index');
const Wallet = require('./wallet');
const wallet = new Wallet();
// const block = new Block('time', 'lasthash', 'hash', 'data');
// console.log(block.toString());
// console.log(Block.genesis().toString());
// const fooBlock = Block.mineBlock(Block.genesis(), 'foo');
// console.log(fooBlock.toString());
// const bc = new Blockchain();
// const bc2 = new Blockchain();
// bc2.addBlock('foo');
// console.log(bc2.chain);
// console.log(bc.isValidChain(bc2.chain));
// const bc = new Blockchain();
// for(let i=0; i<10; i++) {
// console.log(bc.addBlock(`foo-${i}`).toString());
// }
console.log(wallet.toString());