Skip to content

Commit 21e4f0a

Browse files
committed
formatting in WalletRegistryBenchmark
1 parent 8a9f4ee commit 21e4f0a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/test/scala/org/ergoplatform/nodeView/wallet/persistence/WalletRegistryBenchmark.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ object WalletRegistryBenchmark extends App with ErgoTestConstants {
3333

3434
implicit val enc = new ErgoAddressEncoder(ErgoAddressEncoder.MainnetNetworkPrefix)
3535

36-
3736
val registry = WalletRegistry(settings)
3837
val storage = WalletStorage.readOrCreate(settings)(enc)
3938

40-
val rootSecret = ExtendedSecretKey.deriveMasterKey(Array.fill(32)(0:Byte))
39+
val rootSecret = ExtendedSecretKey.deriveMasterKey(Array.fill(32)(0: Byte))
4140

4241
val derivedSecrets = (1 to 15000).map { i =>
4342
val k = rootSecret.derive(DerivationPath.fromEncoded(s"m/44'/429'/0'/0/$i").get)
@@ -50,12 +49,12 @@ object WalletRegistryBenchmark extends App with ErgoTestConstants {
5049

5150
val boxes = walletVars.proverOpt.get.hdPubKeys.map { pk =>
5251
createBox(1000000000, pk.key, 1)
53-
}.map{box =>
52+
}.map { box =>
5453
TrackedBox(box, 2, Set(Constants.PaymentsScanId))
5554
}
5655

5756
val scanResults0 = ScanResults(boxes, Seq.empty, Seq.empty)
58-
registry.updateOnBlock(scanResults0, ModifierId @@ Base16.encode(Array.fill(32)(0:Byte)), 1)
57+
registry.updateOnBlock(scanResults0, ModifierId @@ Base16.encode(Array.fill(32)(0: Byte)), 1)
5958
println("keys: " + walletVars.proverOpt.get.secretKeys.size)
6059

6160
val bts0 = System.currentTimeMillis()
@@ -68,18 +67,18 @@ object WalletRegistryBenchmark extends App with ErgoTestConstants {
6867

6968
val txs = boxes.map { tb =>
7069
val bx = tb.box
71-
val input = new Input(bx.id, ProverResult(Array.fill(64)(0:Byte), ContextExtension.empty))
70+
val input = new Input(bx.id, ProverResult(Array.fill(64)(0: Byte), ContextExtension.empty))
7271
val tx = ErgoTransaction(IndexedSeq(input), IndexedSeq(bx.toCandidate))
7372
WalletTransaction(tx, 2, Seq(Constants.PaymentsScanId))
7473
}
7574

7675
val scanResults1 = ScanResults(Seq.empty, Seq.empty, txs)
77-
registry.updateOnBlock(scanResults1, ModifierId @@ Base16.encode(Array.fill(32)(1:Byte)), 2)
76+
registry.updateOnBlock(scanResults1, ModifierId @@ Base16.encode(Array.fill(32)(1: Byte)), 2)
7877

7978
val tts0 = System.currentTimeMillis()
8079
val txsRead = registry.allWalletTxs()
8180
val tts = System.currentTimeMillis()
8281
println("txs read: " + txsRead.size)
83-
println("txs read time: " +(tts - tts0) + " ms")
82+
println("txs read time: " + (tts - tts0) + " ms")
8483

8584
}

0 commit comments

Comments
 (0)