• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

synapsecns / sanguine / 2377976388

24 May 2022 01:02PM UTC coverage: 60.0%. First build
2377976388

Pull #2

github

Trajan0x
leana updateS
Pull Request #2: Go Setup

40 of 40 new or added lines in 2 files covered. (100.0%)

24 of 40 relevant lines covered (60.0%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/core/db/db.go
1
package db
2

3
import (
4
        "fmt"
5
        "github.com/cockroachdb/pebble"
6
)
7

8
// DB contains the synapse db.
9
type DB interface{}
10

11
// pebbleDB contains a rocksdb used to store merkle trees.
12
type pebbleDB struct {
13
        *pebble.DB
14
}
15

16
// NewDB creates a new db.
17
func NewDB(dbPath string) (DB, error) {
×
18
        db, err := pebble.Open(dbPath, &pebble.Options{})
×
19

×
20
        if err != nil {
×
21
                return nil, fmt.Errorf("could not create db: %w", err)
×
22
        }
×
23

24
        return pebbleDB{DB: db}, nil
×
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc