@@ -972,7 +972,6 @@ func (t *TxPublisher) processRecords() {
972
972
// For records that are confirmed, we'll notify the caller about this
973
973
// result.
974
974
for _ , r := range confirmedRecords {
975
- log .Debugf ("Tx=%v is confirmed" , r .tx .TxHash ())
976
975
t .wg .Add (1 )
977
976
go t .handleTxConfirmed (r )
978
977
}
@@ -982,16 +981,13 @@ func (t *TxPublisher) processRecords() {
982
981
983
982
// For records that are not confirmed, we perform a fee bump if needed.
984
983
for _ , r := range feeBumpRecords {
985
- log .Debugf ("Attempting to fee bump Tx=%v" , r .tx .TxHash ())
986
984
t .wg .Add (1 )
987
985
go t .handleFeeBumpTx (r , currentHeight )
988
986
}
989
987
990
988
// For records that are failed, we'll notify the caller about this
991
989
// result.
992
990
for _ , r := range failedRecords {
993
- log .Debugf ("Tx=%v has inputs been spent by a third party, " +
994
- "failing it now" , r .tx .TxHash ())
995
991
t .wg .Add (1 )
996
992
go t .handleThirdPartySpent (r )
997
993
}
@@ -1004,6 +1000,8 @@ func (t *TxPublisher) processRecords() {
1004
1000
func (t * TxPublisher ) handleTxConfirmed (r * monitorRecord ) {
1005
1001
defer t .wg .Done ()
1006
1002
1003
+ log .Debugf ("Record %v is spent in tx=%v" , r .requestID , r .tx .TxHash ())
1004
+
1007
1005
// Create a result that will be sent to the resultChan which is
1008
1006
// listened by the caller.
1009
1007
result := & BumpResult {
@@ -1113,6 +1111,9 @@ func (t *TxPublisher) handleInitialBroadcast(r *monitorRecord) {
1113
1111
func (t * TxPublisher ) handleFeeBumpTx (r * monitorRecord , currentHeight int32 ) {
1114
1112
defer t .wg .Done ()
1115
1113
1114
+ log .Debugf ("Attempting to fee bump tx=%v in record %v" , r .tx .TxHash (),
1115
+ r .requestID )
1116
+
1116
1117
oldTxid := r .tx .TxHash ()
1117
1118
1118
1119
// Get the current conf target for this record.
@@ -1158,6 +1159,10 @@ func (t *TxPublisher) handleFeeBumpTx(r *monitorRecord, currentHeight int32) {
1158
1159
func (t * TxPublisher ) handleThirdPartySpent (r * monitorRecord ) {
1159
1160
defer t .wg .Done ()
1160
1161
1162
+ log .Debugf ("Record %v has inputs spent by a tx unknown to the fee " +
1163
+ "bumper, failing it now:\n %v" , r .requestID ,
1164
+ inputTypeSummary (r .req .Inputs ))
1165
+
1161
1166
// Create a result that will be sent to the resultChan which is
1162
1167
// listened by the caller.
1163
1168
result := & BumpResult {
@@ -1272,17 +1277,6 @@ func (t *TxPublisher) createAndPublishTx(
1272
1277
return fn .Some (* result )
1273
1278
}
1274
1279
1275
- // isConfirmed checks the btcwallet to see whether the tx is confirmed.
1276
- func (t * TxPublisher ) isConfirmed (txid chainhash.Hash ) bool {
1277
- details , err := t .cfg .Wallet .GetTransactionDetails (& txid )
1278
- if err != nil {
1279
- log .Warnf ("Failed to get tx details for %v: %v" , txid , err )
1280
- return false
1281
- }
1282
-
1283
- return details .NumConfirmations > 0
1284
- }
1285
-
1286
1280
// isThirdPartySpent checks whether the inputs of the tx has already been spent
1287
1281
// by a third party. When a tx is not confirmed, yet its inputs has been spent,
1288
1282
// then it must be spent by a different tx other than the sweeping tx here.
0 commit comments