Skip to content

Commit

Permalink
Merge pull request OffchainLabs#2352 from OffchainLabs/wasm-db-use-ex…
Browse files Browse the repository at this point in the history
…tra-options

use pebble extra options when opening wasm db
  • Loading branch information
tsahee authored May 29, 2024
2 parents ef26351 + 2c71a0b commit d5ca4bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/nitro/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func openInitializeChainDb(ctx context.Context, stack *node.Node, config *NodeCo
if err != nil {
return nil, nil, err
}
wasmDb, err := stack.OpenDatabase("wasm", config.Execution.Caching.DatabaseCache, config.Persistent.Handles, "wasm/", false)
wasmDb, err := stack.OpenDatabaseWithExtraOptions("wasm", config.Execution.Caching.DatabaseCache, config.Persistent.Handles, "wasm/", false, persistentConfig.Pebble.ExtraOptions("wasm"))
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -353,7 +353,7 @@ func openInitializeChainDb(ctx context.Context, stack *node.Node, config *NodeCo
if err != nil {
return nil, nil, err
}
wasmDb, err := stack.OpenDatabase("wasm", config.Execution.Caching.DatabaseCache, config.Persistent.Handles, "wasm/", false)
wasmDb, err := stack.OpenDatabaseWithExtraOptions("wasm", config.Execution.Caching.DatabaseCache, config.Persistent.Handles, "wasm/", false, persistentConfig.Pebble.ExtraOptions("wasm"))
if err != nil {
return nil, nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions system_tests/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ func createL2BlockChainWithStackConfig(

chainData, err := stack.OpenDatabaseWithExtraOptions("l2chaindata", 0, 0, "l2chaindata/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("l2chaindata"))
Require(t, err)
wasmData, err := stack.OpenDatabase("wasm", 0, 0, "wasm/", false)
wasmData, err := stack.OpenDatabaseWithExtraOptions("wasm", 0, 0, "wasm/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("wasm"))
Require(t, err)
chainDb := rawdb.WrapDatabaseWithWasm(chainData, wasmData, 0)
arbDb, err := stack.OpenDatabaseWithExtraOptions("arbitrumdata", 0, 0, "arbitrumdata/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("arbitrumdata"))
Expand Down Expand Up @@ -983,7 +983,7 @@ func Create2ndNodeWithConfig(

l2chainData, err := l2stack.OpenDatabaseWithExtraOptions("l2chaindata", 0, 0, "l2chaindata/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("l2chaindata"))
Require(t, err)
wasmData, err := l2stack.OpenDatabase("wasm", 0, 0, "wasm/", false)
wasmData, err := l2stack.OpenDatabaseWithExtraOptions("wasm", 0, 0, "wasm/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("wasm"))
Require(t, err)
l2chainDb := rawdb.WrapDatabaseWithWasm(l2chainData, wasmData, 0)

Expand Down

0 comments on commit d5ca4bf

Please sign in to comment.