hold ts lock longer
This commit is contained in:
parent
47f81f1ad6
commit
7b16fe3792
@ -16,10 +16,10 @@ const repubMsgLimit = 30
|
|||||||
func (mp *MessagePool) republishPendingMessages() error {
|
func (mp *MessagePool) republishPendingMessages() error {
|
||||||
mp.curTsLk.Lock()
|
mp.curTsLk.Lock()
|
||||||
ts := mp.curTs
|
ts := mp.curTs
|
||||||
mp.curTsLk.Unlock()
|
|
||||||
|
|
||||||
baseFee, err := mp.api.ChainComputeBaseFee(context.TODO(), ts)
|
baseFee, err := mp.api.ChainComputeBaseFee(context.TODO(), ts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
mp.curTsLk.Unlock()
|
||||||
return xerrors.Errorf("computing basefee: %w", err)
|
return xerrors.Errorf("computing basefee: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +41,7 @@ func (mp *MessagePool) republishPendingMessages() error {
|
|||||||
pending[actor] = pend
|
pending[actor] = pend
|
||||||
}
|
}
|
||||||
mp.lk.Unlock()
|
mp.lk.Unlock()
|
||||||
|
mp.curTsLk.Unlock()
|
||||||
|
|
||||||
if len(pending) == 0 {
|
if len(pending) == 0 {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user