lpseal: write precommit message to message_waits

This commit is contained in:
Łukasz Magiera 2024-01-04 16:57:31 +01:00
parent 2c7041b167
commit 2f45646a92
2 changed files with 5 additions and 2 deletions

View File

@ -41,8 +41,6 @@ create table sectors_sdr_pipeline (
-- precommit message wait
seed_epoch bigint,
precommit_msg_tsk bytea,
task_id_precommit_msg_wait bigint,
after_precommit_msg_success bool not null default false,
-- seed

View File

@ -120,6 +120,11 @@ func (s *SubmitPrecommitTask) Do(taskID harmonytask.TaskID, stillOwned func() bo
return false, xerrors.Errorf("updating precommit_msg_cid: %w", err)
}
_, err = s.db.Exec(ctx, `INSERT INTO message_waits (signed_message_cid) VALUES ($1)`, mcid)
if err != nil {
return false, xerrors.Errorf("inserting into message_waits: %w", err)
}
return true, nil
}