diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 9b24e1b6c..5437b64c5 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -4,7 +4,6 @@ from utils import wait_for, TIMEOUT, only_one import json import logging import os -import pytest import struct import subprocess import time @@ -865,7 +864,6 @@ def test_gossipwith(node_factory): assert num_msgs == 5 -@pytest.mark.xfail(strict=True) def test_gossip_notices_close(node_factory, bitcoind): # We want IO logging so we can replay a channel_announce to l1. l1 = node_factory.get_node(options={'log-level': 'io'}) diff --git a/wallet/wallet.c b/wallet/wallet.c index 23b94020f..9f2216811 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2139,7 +2139,8 @@ struct outpoint *wallet_outpoint_for_scid(struct wallet *w, tal_t *ctx, "FROM utxoset " "WHERE blockheight = ?" " AND txindex = ?" - " AND outnum = ?"); + " AND outnum = ?" + " AND spendheight IS NULL"); sqlite3_bind_int(stmt, 1, short_channel_id_blocknum(scid)); sqlite3_bind_int(stmt, 2, short_channel_id_txnum(scid)); sqlite3_bind_int(stmt, 3, short_channel_id_outnum(scid));