mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-12 15:17:32 +01:00
multi: add a re-usable TxOptions type
Add a re-usable implementation of the sqldb.TxOptions interface and make use of this in the various spots (invoices, batch and graph/db) where we had previously defined individual implementations that were all doing the same thing.
This commit is contained in:
@@ -70,9 +70,8 @@ func TestMigrationWithChannelDB(t *testing.T) {
|
||||
ctxb := context.Background()
|
||||
|
||||
const batchSize = 11
|
||||
var opts sqldb.MigrationTxOptions
|
||||
err := sqlStore.ExecTx(
|
||||
ctxb, &opts, func(tx *sqlc.Queries) error {
|
||||
ctxb, sqldb.WriteTxOpt(), func(tx *sqlc.Queries) error {
|
||||
return invpkg.MigrateInvoicesToSQL(
|
||||
ctxb, kvStore.Backend, kvStore, tx,
|
||||
batchSize,
|
||||
|
||||
Reference in New Issue
Block a user