mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-21 14:10:35 +02:00
htlcswitch+channeldb: single tx for removing fwdpkgs
This commit changes RemoveFwdPkg to RemoveFwdPkgs so that a single tx is used instead of N where N is the number of fwd pkgs to remove.
This commit is contained in:
@@ -776,7 +776,7 @@ func (l *channelLink) resolveFwdPkg(fwdPkg *channeldb.FwdPkg) error {
|
||||
l.log.Debugf("removing completed fwd pkg for height=%d",
|
||||
fwdPkg.Height)
|
||||
|
||||
err := l.channel.RemoveFwdPkg(fwdPkg.Height)
|
||||
err := l.channel.RemoveFwdPkgs(fwdPkg.Height)
|
||||
if err != nil {
|
||||
l.log.Errorf("unable to remove fwd pkg for height=%d: "+
|
||||
"%v", fwdPkg.Height, err)
|
||||
@@ -859,7 +859,7 @@ func (l *channelLink) fwdPkgGarbager() {
|
||||
continue
|
||||
}
|
||||
|
||||
err = l.channel.RemoveFwdPkg(fwdPkg.Height)
|
||||
err = l.channel.RemoveFwdPkgs(fwdPkg.Height)
|
||||
if err != nil {
|
||||
l.log.Warnf("unable to remove fwd pkg "+
|
||||
"for height=%d: %v",
|
||||
|
Reference in New Issue
Block a user