Skip to content

Commit

Permalink
Merge pull request #73 from bartdejonge1996/demo-optimizations
Browse files Browse the repository at this point in the history
Demo optimizations
  • Loading branch information
Taeir authored Feb 1, 2018
2 parents 7c3dd5b + a0e1962 commit 2578aeb
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import nl.tudelft.blockchain.scaleoutdistributedledger.utils.Log;
import nl.tudelft.blockchain.scaleoutdistributedledger.validation.ValidationException;

import java.io.IOException;
import java.util.logging.Level;

/**
Expand Down Expand Up @@ -38,11 +37,7 @@ public static boolean receiveTransaction(Proof proof, LocalStore localStore) {
Log.log(Level.INFO, "Received and validated transaction: " + proof.getTransaction());
Log.log(Level.FINE, "Transaction " + proof.getTransaction() + " is valid, applying updates...");
proof.applyUpdates(localStore);
try {
TrackerHelper.registerTransaction(proof);
} catch (IOException e) {
Log.log(Level.WARNING, "Transaction registration failed", e);
}
TrackerHelper.registerTransaction(proof);

if (proof.getTransaction().getAmount() > 0) {
localStore.addUnspentTransaction(proof.getTransaction());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public final class SimulationMain {
public static final long SENDING_WAIT_TIME = 5000;
// The number of blocks (with the same or higher block number) that need to be committed before we send a certain block.
public static final int REQUIRED_COMMITS = 2;
// The number of transactions that are registered in one batch.
public static final int REGISTER_TRANSACTIONS_EVERY = 10;

private SimulationMain() {}

Expand Down
Loading

0 comments on commit 2578aeb

Please sign in to comment.