mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
Implements SQLite repositories (#180)
* add sqlite db * add .vscode to gitignore * add vtxo repo * add sqlite repos implementations * add sqlite in db/service * update go.mod * fix sqlite * move sqlite tests to service_test.go + fixes * integration tests using sqlite + properly close statements * implement GetRoundsIds * add "tx" table to store forfeits, connectors and congestion trees * add db max conn = 1 * upsert VTXO + fix onboarding * remove json tags * Fixes * Fix * fix lint * fix config.go * Fix rm config & open db only once * Update makefile --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ark-network/ark/internal/core/domain"
|
||||
dbtypes "github.com/ark-network/ark/internal/infrastructure/db/types"
|
||||
"github.com/dgraph-io/badger/v4"
|
||||
"github.com/timshannon/badgerhold/v4"
|
||||
)
|
||||
@@ -17,7 +16,7 @@ type roundRepository struct {
|
||||
store *badgerhold.Store
|
||||
}
|
||||
|
||||
func NewRoundRepository(config ...interface{}) (dbtypes.RoundStore, error) {
|
||||
func NewRoundRepository(config ...interface{}) (domain.RoundRepository, error) {
|
||||
if len(config) != 2 {
|
||||
return nil, fmt.Errorf("invalid config")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user