multi: remove mempool bool from RegisterSpendNtfn

This commit is contained in:
Johan T. Halseth 2018-07-17 09:13:06 +02:00
parent 02f7f29b97
commit 57e829f47e
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
4 changed files with 7 additions and 8 deletions

@ -357,7 +357,7 @@ func (b *breachArbiter) waitForSpendEvent(breachInfo *retributionInfo,
var err error
spendNtfn, err = b.cfg.Notifier.RegisterSpendNtfn(
&breachedOutput.outpoint,
breachInfo.breachHeight, false,
breachInfo.breachHeight,
)
if err != nil {
brarLog.Errorf("unable to check for spentness "+

@ -497,7 +497,7 @@ func (c *ChainArbitrator) Stop() error {
// NOTE: This must be launched as a goroutine.
func (c *ChainArbitrator) watchForChannelClose(closeInfo *channeldb.ChannelCloseSummary) {
spendNtfn, err := c.cfg.Notifier.RegisterSpendNtfn(
&closeInfo.ChanPoint, closeInfo.CloseHeight, false,
&closeInfo.ChanPoint, closeInfo.CloseHeight,
)
if err != nil {
log.Errorf("unable to register for spend: %v", err)

@ -173,7 +173,7 @@ func (c *chainWatcher) Start() error {
}
spendNtfn, err := c.cfg.notifier.RegisterSpendNtfn(
fundingOut, heightHint, false,
fundingOut, heightHint,
)
if err != nil {
return err

@ -172,7 +172,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
// has been spent by a confirmed transaction.
spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&h.htlcResolution.ClaimOutpoint,
h.broadcastHeight, false,
h.broadcastHeight,
)
if err != nil {
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
// been spent, then fully resolve the contract.
spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&h.htlcResolution.ClaimOutpoint, h.broadcastHeight, false,
&h.htlcResolution.ClaimOutpoint, h.broadcastHeight,
)
if err != nil {
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
// the remote party sweeps with the pre-image, we'll be notified.
spendNtfn, err := h.Notifier.RegisterSpendNtfn(
&outPointToWatch,
h.broadcastHeight, false,
&outPointToWatch, h.broadcastHeight,
)
if err != nil {
return nil, err
@ -1288,7 +1287,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
// until the commitment output has been spent.
spendNtfn, err := c.Notifier.RegisterSpendNtfn(
&c.commitResolution.SelfOutPoint,
c.broadcastHeight, false,
c.broadcastHeight,
)
if err != nil {
return nil, err