multi: remove mempool bool from RegisterSpendNtfn

This commit is contained in:
Johan T. Halseth committed 2018-07-22 23:09:08 +02:00
1 parent 02f7f29b97
commit 57e829f47e
4 files changed
+7 -8

No files matched your search

+1 -1
View File
@@ -357,7 +357,7 @@ func (b *breachArbiter) waitForSpendEvent(breachInfo *retributionInfo,
var err error var err error
spendNtfn, err = b.cfg.Notifier.RegisterSpendNtfn( spendNtfn, err = b.cfg.Notifier.RegisterSpendNtfn(
&breachedOutput.outpoint, &breachedOutput.outpoint,
breachInfo.breachHeight, false, breachInfo.breachHeight,
) )
if err != nil { if err != nil {
brarLog.Errorf("unable to check for spentness "+ brarLog.Errorf("unable to check for spentness "+
+1 -1
View File
@@ -497,7 +497,7 @@ func (c *ChainArbitrator) Stop() error {
// NOTE: This must be launched as a goroutine. // NOTE: This must be launched as a goroutine.
func (c *ChainArbitrator) watchForChannelClose(closeInfo *channeldb.ChannelCloseSummary) { func (c *ChainArbitrator) watchForChannelClose(closeInfo *channeldb.ChannelCloseSummary) {
spendNtfn, err := c.cfg.Notifier.RegisterSpendNtfn( spendNtfn, err := c.cfg.Notifier.RegisterSpendNtfn(
&closeInfo.ChanPoint, closeInfo.CloseHeight, false, &closeInfo.ChanPoint, closeInfo.CloseHeight,
) )
if err != nil { if err != nil {
log.Errorf("unable to register for spend: %v", err) log.Errorf("unable to register for spend: %v", err)
+1 -1
View File
@@ -173,7 +173,7 @@ func (c *chainWatcher) Start() error {
} }
spendNtfn, err := c.cfg.notifier.RegisterSpendNtfn( spendNtfn, err := c.cfg.notifier.RegisterSpendNtfn(
fundingOut, heightHint, false, fundingOut, heightHint,
) )
if err != nil { if err != nil {
return err return err
+4 -5
View File
@@ -172,7 +172,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
// has been spent by a confirmed transaction. // has been spent by a confirmed transaction.
spendNtfn, err := h.Notifier.RegisterSpendNtfn( spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&h.htlcResolution.ClaimOutpoint, &h.htlcResolution.ClaimOutpoint,
h.broadcastHeight, false, h.broadcastHeight,
) )
if err != nil { if err != nil {
return err return err
@@ -580,7 +580,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
// To wrap this up, we'll wait until the second-level transaction has // To wrap this up, we'll wait until the second-level transaction has
// been spent, then fully resolve the contract. // been spent, then fully resolve the contract.
spendNtfn, err := h.Notifier.RegisterSpendNtfn( spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&h.htlcResolution.ClaimOutpoint, h.broadcastHeight, false, &h.htlcResolution.ClaimOutpoint, h.broadcastHeight,
) )
if err != nil { if err != nil {
return nil, err return nil, err
@@ -791,8 +791,7 @@ func (h *htlcOutgoingContestResolver) Resolve() (ContractResolver, error) {
// First, we'll register for a spend notification for this output. If // First, we'll register for a spend notification for this output. If
// the remote party sweeps with the pre-image, we'll be notified. // the remote party sweeps with the pre-image, we'll be notified.
spendNtfn, err := h.Notifier.RegisterSpendNtfn( spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&outPointToWatch, &outPointToWatch, h.broadcastHeight,
h.broadcastHeight, false,
) )
if err != nil { if err != nil {
return nil, err return nil, err
@@ -1288,7 +1287,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
// until the commitment output has been spent. // until the commitment output has been spent.
spendNtfn, err := c.Notifier.RegisterSpendNtfn( spendNtfn, err := c.Notifier.RegisterSpendNtfn(
&c.commitResolution.SelfOutPoint, &c.commitResolution.SelfOutPoint,
c.broadcastHeight, false, c.broadcastHeight,
) )
if err != nil { if err != nil {
return nil, err return nil, err