Skip to content

Commit

Permalink
Merge branch 'version-1.5.x' into NODE-2606
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot authored Nov 6, 2023
2 parents d01bc78 + d711d9a commit 0ae2817
Show file tree
Hide file tree
Showing 151 changed files with 4,361 additions and 2,137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ abstract class DBState extends ScorexLogging {
new RocksDBWriter(
rdb,
settings.blockchainSettings,
settings.dbSettings.copy(maxCacheSize = 1)
settings.dbSettings.copy(maxCacheSize = 1),
settings.enableLightMode
)

AddressScheme.current = new AddressScheme { override val chainId: Byte = 'W' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object RollbackBenchmark extends ScorexLogging {
val settings = Application.loadApplicationConfig(Some(new File(args(0))))
val rdb = RDB.open(settings.dbSettings)
val time = new NTP(settings.ntpServer)
val rocksDBWriter = new RocksDBWriter(rdb, settings.blockchainSettings, settings.dbSettings)
val rocksDBWriter = new RocksDBWriter(rdb, settings.blockchainSettings, settings.dbSettings, settings.enableLightMode)

val issuer = KeyPair(new Array[Byte](32))

Expand Down Expand Up @@ -80,6 +80,7 @@ object RollbackBenchmark extends ScorexLogging {
0,
None,
genesisBlock.header.generationSignature,
ByteStr.empty,
genesisBlock
)

Expand All @@ -103,7 +104,7 @@ object RollbackBenchmark extends ScorexLogging {
val nextSnapshot = StateSnapshot.build(rocksDBWriter, portfolios2.toMap).explicitGet()

log.info("Appending next block")
rocksDBWriter.append(nextSnapshot, 0, 0, None, ByteStr.empty, nextBlock)
rocksDBWriter.append(nextSnapshot, 0, 0, None, ByteStr.empty, ByteStr.empty, nextBlock)

log.info("Rolling back")
val start = System.nanoTime()
Expand Down
Loading

0 comments on commit 0ae2817

Please sign in to comment.