This commit is contained in:
Neil Alexander 2020-02-13 10:30:18 +00:00
parent 2e8138dffd
commit 28c2249b25
2 changed files with 2 additions and 1 deletions

View file

@ -285,6 +285,7 @@ func (d *Database) AddState(
) (stateNID types.StateSnapshotNID, err error) {
err = common.WithTransaction(d.db, func(txn *sql.Tx) error {
if len(state) > 0 {
var stateBlockNID types.StateBlockNID
stateBlockNID, err = d.statements.selectNextStateBlockNID(ctx, txn)
if err != nil {
return err

View file

@ -89,7 +89,7 @@ func NewSyncServerDatasource(dataSourceName string) (*SyncServerDatasource, erro
return &d, nil
}
func (d *SyncServerDataSource) prepare() error {
func (d *SyncServerDatasource) prepare() (err error) {
if err = d.PartitionOffsetStatements.Prepare(d.db, "syncapi"); err != nil {
return err
}