Documentation
¶
Index ¶
- Variables
- type Config
- type Database
- func (d *Database) CloseDB()
- func (d *Database) CreateTable(tableName string) error
- func (d *Database) GetCurrentState() (State, error)
- func (d *Database) GetSpecificState(gap int) (State, error)
- func (d *Database) InitializeTables() error
- func (d *Database) InsertBlock(block primitives.Block) error
- func (d *Database) Ping() error
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorPrevBlockHash = errors.New("block previous hash doesn't match")
)
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database represents an DB connection
func NewDBClient ¶
NewDBClient creates a db client
func (*Database) CreateTable ¶
func (*Database) GetCurrentState ¶
func (*Database) GetSpecificState ¶
returns state from height - gap
func (*Database) InitializeTables ¶
func (*Database) InsertBlock ¶
func (d *Database) InsertBlock(block primitives.Block) error
InsertBlock a block into the db.
Click to show internal directories.
Click to hide internal directories.