(dbFile string)
| 40 | } |
| 41 | |
| 42 | func initChainDBConnection(dbFile string) (err error) { |
| 43 | chaindb, err = OpenSQLiteDBAsGorp(dbFile, "ro", 100, 30) |
| 44 | if err != nil { |
| 45 | return err |
| 46 | } |
| 47 | |
| 48 | // register tables |
| 49 | chaindb.AddTableWithName(Block{}, "indexed_blocks").SetKeys(false, "Height") |
| 50 | chaindb.AddTableWithName(Transaction{}, "indexed_transactions").SetKeys(false, "BlockHeight", "TxIndex") |
| 51 | |
| 52 | return nil |
| 53 | } |
no test coverage detected