Skip to content

Commit b29ce97

Browse files
guggeroRoasbeef
authored andcommitted
rpcwebsocket: fi linter complaint about unused functions
1 parent 9dfa926 commit b29ce97

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

rpcwebsocket.go

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -377,50 +377,6 @@ func (f *wsClientFilter) existsAddress(a address.Address) bool {
377377
return ok
378378
}
379379

380-
// removeAddress removes the passed address, if it exists, from the
381-
// wsClientFilter.
382-
//
383-
// NOTE: This extension was ported from github.com/decred/dcrd
384-
func (f *wsClientFilter) removeAddress(a address.Address) {
385-
switch a := a.(type) {
386-
case *address.AddressPubKeyHash:
387-
delete(f.pubKeyHashes, *a.Hash160())
388-
return
389-
case *address.AddressScriptHash:
390-
delete(f.scriptHashes, *a.Hash160())
391-
return
392-
case *address.AddressPubKey:
393-
serializedPubKey := a.ScriptAddress()
394-
switch len(serializedPubKey) {
395-
case 33: // compressed
396-
var compressedPubKey [33]byte
397-
copy(compressedPubKey[:], serializedPubKey)
398-
delete(f.compressedPubKeys, compressedPubKey)
399-
return
400-
case 65: // uncompressed
401-
var uncompressedPubKey [65]byte
402-
copy(uncompressedPubKey[:], serializedPubKey)
403-
delete(f.uncompressedPubKeys, uncompressedPubKey)
404-
return
405-
}
406-
}
407-
408-
delete(f.otherAddresses, a.EncodeAddress())
409-
}
410-
411-
// removeAddressStr parses an address from a string and then removes it from the
412-
// wsClientFilter using removeAddress.
413-
//
414-
// NOTE: This extension was ported from github.com/decred/dcrd
415-
func (f *wsClientFilter) removeAddressStr(s string, params *chaincfg.Params) {
416-
a, err := address.DecodeAddress(s, params)
417-
if err == nil {
418-
f.removeAddress(a)
419-
} else {
420-
delete(f.otherAddresses, s)
421-
}
422-
}
423-
424380
// addUnspentOutPoint adds an outpoint to the wsClientFilter.
425381
//
426382
// NOTE: This extension was ported from github.com/decred/dcrd

0 commit comments

Comments
 (0)