Skip to content

Commit 2c32538

Browse files
committed
Adapt to C API rename: Set*DBInMemory -> Update*DBInMemory
1 parent 62e8971 commit 2c32538

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

kernel/chainstate_manager_options.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,26 @@ func (opts *ChainstateManagerOptions) SetWipeDBs(wipeBlockTree, wipeChainstate b
8888
return nil
8989
}
9090

91-
// SetBlockTreeDBInMemory configures whether the block tree database is stored in memory.
91+
// UpdateBlockTreeDBInMemory configures whether the block tree database is stored in memory.
9292
//
9393
// Parameters:
9494
// - inMemory: If true, the block tree database will be kept entirely in memory
95-
func (opts *ChainstateManagerOptions) SetBlockTreeDBInMemory(inMemory bool) {
95+
func (opts *ChainstateManagerOptions) UpdateBlockTreeDBInMemory(inMemory bool) {
9696
inMemoryInt := 0
9797
if inMemory {
9898
inMemoryInt = 1
9999
}
100-
C.btck_chainstate_manager_options_set_block_tree_db_in_memory((*C.btck_ChainstateManagerOptions)(opts.ptr), C.int(inMemoryInt))
100+
C.btck_chainstate_manager_options_update_block_tree_db_in_memory((*C.btck_ChainstateManagerOptions)(opts.ptr), C.int(inMemoryInt))
101101
}
102102

103-
// SetChainstateDBInMemory configures whether the chainstate database is stored in memory.
103+
// UpdateChainstateDBInMemory configures whether the chainstate database is stored in memory.
104104
//
105105
// Parameters:
106106
// - inMemory: If true, the chainstate database will be kept entirely in memory
107-
func (opts *ChainstateManagerOptions) SetChainstateDBInMemory(inMemory bool) {
107+
func (opts *ChainstateManagerOptions) UpdateChainstateDBInMemory(inMemory bool) {
108108
inMemoryInt := 0
109109
if inMemory {
110110
inMemoryInt = 1
111111
}
112-
C.btck_chainstate_manager_options_set_chainstate_db_in_memory((*C.btck_ChainstateManagerOptions)(opts.ptr), C.int(inMemoryInt))
112+
C.btck_chainstate_manager_options_update_chainstate_db_in_memory((*C.btck_ChainstateManagerOptions)(opts.ptr), C.int(inMemoryInt))
113113
}

kernel/chainstate_manager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ func (s *ChainstateManagerTestSuite) Setup(t *testing.T) {
181181
t.Cleanup(func() { opts.Destroy() })
182182

183183
opts.SetWorkerThreads(1)
184-
opts.SetBlockTreeDBInMemory(true)
185-
opts.SetChainstateDBInMemory(true)
184+
opts.UpdateBlockTreeDBInMemory(true)
185+
opts.UpdateChainstateDBInMemory(true)
186186
// Wipe both databases to enable proper initialization
187187
err = opts.SetWipeDBs(true, true)
188188
if err != nil {

0 commit comments

Comments
 (0)