htlcswitch: use Batch for calls within ackSettleFail

This commit is contained in:
Olaoluwa Osuntokun 2018-06-30 17:15:24 -05:00
parent 3ad15c5f42
commit d889644f52
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -1251,7 +1251,7 @@ func (s *Switch) closeCircuit(pkt *htlcPacket) (*PaymentCircuit, error) {
// we're the originator of the payment, so the link stops attempting to
// re-broadcast.
func (s *Switch) ackSettleFail(settleFailRef channeldb.SettleFailRef) error {
return s.cfg.DB.Update(func(tx *bolt.Tx) error {
return s.cfg.DB.Batch(func(tx *bolt.Tx) error {
return s.cfg.SwitchPackager.AckSettleFails(tx, settleFailRef)
})
}