@@ -24,23 +24,23 @@ object OneMinerSimulation extends App with Simulators {
24
24
25
25
type Height = Int
26
26
27
- val experimentId = Random .nextInt(500000 )
28
- val NewBoxesPerBlock = 5000
27
+ private val experimentId = Random .nextInt(500000 )
28
+ private val NewBoxesPerBlock = 5000
29
29
30
- val headersChain = mutable.Map [Height , BlockHeader ]()
30
+ private val headersChain = mutable.Map [Height , BlockHeader ]()
31
31
32
- val bcDir = new File (" /tmp/oms/bc" + experimentId)
32
+ private val bcDir = new File (" /tmp/oms/bc" + experimentId)
33
33
bcDir.mkdirs()
34
34
35
- val fullBlocksStore = new MemoryFullBlockStore
35
+ private val fullBlocksStore = new MemoryFullBlockStore
36
36
// val fullBlocksStore = new LSMStore(bcDir, keySize = 4)
37
37
38
38
def currentHeight : Int = Try (headersChain.keySet.max).getOrElse(0 )
39
39
40
- val cuDir = new File (" /tmp/oms/cu" + experimentId)
40
+ private val cuDir = new File (" /tmp/oms/cu" + experimentId)
41
41
cuDir.mkdirs()
42
42
43
- val muDir = new File (" /tmp/oms/mu" + experimentId)
43
+ private val muDir = new File (" /tmp/oms/mu" + experimentId)
44
44
muDir.mkdirs()
45
45
46
46
def generateTransactions (richBoxes : Seq [PublicKey25519NoncedBox ]): Seq [SimpleBoxTransaction ] = {
@@ -65,17 +65,17 @@ object OneMinerSimulation extends App with Simulators {
65
65
val genesisChanges : BoxStateChanges [PublicKey25519Proposition , PublicKey25519NoncedBox ] =
66
66
BoxStateChanges (genesisBoxes.map(box => Insertion [PublicKey25519Proposition , PublicKey25519NoncedBox ](box)))
67
67
68
- var currentUtxo = InMemoryAuthenticatedUtxo (genesisBoxes.size, None , defaultId).applyChanges(genesisChanges, defaultId).get
68
+ private var currentUtxo = InMemoryAuthenticatedUtxo (genesisBoxes.size, None , defaultId).applyChanges(genesisChanges, defaultId).get
69
69
70
- var miningHeight = 0
71
- var miningUtxo = InMemoryAuthenticatedUtxo (genesisBoxes.size, None , defaultId).applyChanges(genesisChanges, defaultId).get
70
+ private var miningHeight = 0
71
+ private var miningUtxo = InMemoryAuthenticatedUtxo (genesisBoxes.size, None , defaultId).applyChanges(genesisChanges, defaultId).get
72
72
.ensuring(_.rootHash sameElements currentUtxo.rootHash)
73
73
74
74
var generatingBoxes : Seq [PublicKey25519NoncedBox ] = genesisBoxes
75
75
76
76
log(" Current height,Mining height,Current utxo size,Mining utxo size,Work valid,Header size,Ticket size,Proof size,Block size" )
77
77
78
- val blocksNum = 10000
78
+ private val blocksNum = 10000
79
79
(1 to blocksNum) foreach { _ =>
80
80
val t0 = System .currentTimeMillis()
81
81
0 commit comments