reorg code, integration publish/subscribe working, still some TODOs

This commit is contained in:
Josip Milovac 2023-02-01 13:01:51 +11:00
parent 043a95d9ef
commit 1af6d56e2d
35 changed files with 3052 additions and 1401 deletions

View file

@ -4,13 +4,13 @@ describe('Block', () => {
let data, lastBlock, block;
beforeEach(() => {
data = 'bar';
reward = 'bar';
lastBlock = Block.genesis();
block = Block.mineBlock(lastBlock, data);
block = Block.debugMine(lastBlock, reward,[],[]);
});
it('sets the `data` to match the input', () => {
expect(block.data).toEqual(data);
expect(block.reward).toEqual(reward);
});
it('sets the `lastHash` to match the hash of the last block', () => {