persistence for the blockchain + everything through the chain instead of broadcasting
This commit is contained in:
parent
1cb1070d45
commit
ea81105df6
5 changed files with 127 additions and 61 deletions
|
@ -25,9 +25,8 @@ class Miner {
|
|||
console.log(validTransactions);
|
||||
// const validMetadataS = this.transactionPool.metadataS;
|
||||
const block = this.blockchain.addBlock([validTransactions, validMetadataS]);
|
||||
this.p2pServer.syncChains();
|
||||
this.p2pServer.newBlock(block);
|
||||
this.transactionPool.clear();
|
||||
this.p2pServer.broadcastClearTransactions();
|
||||
|
||||
return block;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue