File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1039,13 +1039,24 @@ func (t *TxPublisher) isThirdPartySpent(txid chainhash.Hash,
1039
1039
for _ , inp := range inputs {
1040
1040
op := inp .OutPoint ()
1041
1041
1042
+ // For wallet utxos, the height hint is not set - we don't need
1043
+ // to monitor them for third party spend.
1044
+ heightHint := inp .HeightHint ()
1045
+ if heightHint == 0 {
1046
+ log .Debugf ("Skipped third party check for wallet " +
1047
+ "input %v" , op )
1048
+
1049
+ continue
1050
+ }
1051
+
1042
1052
// If the input has already been spent after the height hint, a
1043
1053
// spend event is sent back immediately.
1044
1054
spendEvent , err := t .cfg .Notifier .RegisterSpendNtfn (
1045
- & op , inp .SignDesc ().Output .PkScript , inp . HeightHint () ,
1055
+ & op , inp .SignDesc ().Output .PkScript , heightHint ,
1046
1056
)
1047
1057
if err != nil {
1048
- log .Criticalf ("Failed to register spend ntfn: %v" , err )
1058
+ log .Criticalf ("Failed to register spend ntfn for " +
1059
+ "input=%v: %v" , op , err )
1049
1060
return false
1050
1061
}
1051
1062
You can’t perform that action at this time.
0 commit comments