@@ -90,7 +90,7 @@ func BlockEncoderToPGStruct(block *lib.MsgDeSoBlock, keyBytes []byte, params *li
9090
9191// PostBatchOperation is the entry point for processing a batch of post entries. It determines the appropriate handler
9292// based on the operation type and executes it.
93- func BlockBatchOperation (entries []* lib.StateChangeEntry , db * bun.DB , params * lib.DeSoParams ) error {
93+ func BlockBatchOperation (entries []* lib.StateChangeEntry , db bun.IDB , params * lib.DeSoParams ) error {
9494 // We check before we call this function that there is at least one operation type.
9595 // We also ensure before this that all entries have the same operation type.
9696 operationType := entries [0 ].OperationType
@@ -107,7 +107,7 @@ func BlockBatchOperation(entries []*lib.StateChangeEntry, db *bun.DB, params *li
107107}
108108
109109// bulkInsertUtxoOperationsEntry inserts a batch of user_association entries into the database.
110- func bulkInsertBlockEntry (entries []* lib.StateChangeEntry , db * bun.DB , operationType lib.StateSyncerOperationType , params * lib.DeSoParams ) error {
110+ func bulkInsertBlockEntry (entries []* lib.StateChangeEntry , db bun.IDB , operationType lib.StateSyncerOperationType , params * lib.DeSoParams ) error {
111111 // If this block is a part of the initial sync, skip it - it will be handled by the utxo operations.
112112 if operationType == lib .DbOperationTypeInsert {
113113 return nil
@@ -217,7 +217,7 @@ func bulkInsertBlockEntry(entries []*lib.StateChangeEntry, db *bun.DB, operation
217217}
218218
219219// bulkDeleteBlockEntry deletes a batch of block entries from the database.
220- func bulkDeleteBlockEntry (entries []* lib.StateChangeEntry , db * bun.DB , operationType lib.StateSyncerOperationType ) error {
220+ func bulkDeleteBlockEntry (entries []* lib.StateChangeEntry , db bun.IDB , operationType lib.StateSyncerOperationType ) error {
221221 // Track the unique entries we've inserted so we don't insert the same entry twice.
222222 uniqueEntries := consumer .UniqueEntries (entries )
223223
@@ -229,7 +229,7 @@ func bulkDeleteBlockEntry(entries []*lib.StateChangeEntry, db *bun.DB, operation
229229
230230// bulkDeleteBlockEntriesFromKeysToDelete deletes a batch of block entries from the database.
231231// It also deletes any transactions and utxo operations associated with the block.
232- func bulkDeleteBlockEntriesFromKeysToDelete (db * bun.DB , keysToDelete [][]byte ) error {
232+ func bulkDeleteBlockEntriesFromKeysToDelete (db bun.IDB , keysToDelete [][]byte ) error {
233233 // Execute the delete query on the blocks table.
234234 if _ , err := db .NewDelete ().
235235 Model (& PGBlockEntry {}).
0 commit comments