btcsuite / btcwallet

A secure bitcoin wallet daemon written in Go (golang)
ISC License
1.15k stars 590 forks source link

wallet: return ErrNotMine for script addresses #909

Closed guggero closed 10 months ago

guggero commented 10 months ago

We recently added the ManagedTaprootScriptAddress type which is not a ManagedPubKeyAddress and therefore doesn't store the derivation info. When trying to fetch the input info for such an address we run into the case where we return nil as the error which causes issues further up in the call stack. This commit fixes the problem by returning an actual error and not the err variable that is nil due to the previous check.