Skip to content

Commit

Permalink
Update protocol.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 21, 2024
1 parent 3839895 commit 01328a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/sidra-chain/protocol.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { SidraChain } from './chain';
import { SidraNode } from './node';
import { Consensus } from './consensus';

class SidraProtocol {
constructor(chain, node) {
this.chain = chain;
this.node = node;
this.consensus = new Consensus(node);
}

createBlock(transactions) {
Expand All @@ -20,7 +22,8 @@ class SidraProtocol {
}

achieveConsensus() {
// Implement a consensus mechanism to ensure network agreement
// Use the consensus mechanism to achieve agreement on a block
this.consensus.achieveConsensus();
}
}

Expand Down

0 comments on commit 01328a0

Please sign in to comment.