func (f *txFilter) RemoveRPCFilter(rpcFilter *pb.TransactionFilter, params *chaincfg.Params) error {
	if rpcFilter == nil {
		return nil
	}
	// Remove outpoints.
	for _, op := range rpcFilter.GetOutpoints() {
		hash, err := chainhash.NewHash(op.GetHash())
		if err != nil {
			return err
		}
		f.RemoveOutpoint(wire.OutPoint{Hash: *hash, Index: op.GetIndex()})
	}

	// Interpret and remove addresses.
	for _, addrStr := range rpcFilter.GetAddresses() {
		addr, err := bchutil.DecodeAddress(addrStr, params)
		if err != nil {
			return fmt.Errorf("unable to decode address '%v': %v", addrStr, err)
		}
		f.RemoveAddress(addr)
	}

	// Remove data elements
	for _, dataElement := range rpcFilter.GetDataElements() {
		f.RemoveDataElement(dataElement)
	}

	f.matchAll = rpcFilter.AllTransactions

	return nil
}
// RemoveRPCFilter removes all filter properties from the
// pb.TransactionFilter from the filter.
RemoveRPCFilter removes all filter properties from the
pb.TransactionFilter from the filter.
// RemoveRPCFilter removes all filter properties from the // pb . TransactionFilter from the filter .
func (f *txFilter) RemoveRPCFilter(rpcFilter *pb.TransactionFilter, params *chaincfg.Params) error {
	if rpcFilter == nil {
		return nil
	}
	for _, op := range rpcFilter.GetOutpoints() {
		hash, err := chainhash.NewHash(op.GetHash())
		if err != nil {
			return err
		}
		f.RemoveOutpoint(wire.OutPoint{Hash: *hash, Index: op.GetIndex()})
	}
	for _, addrStr := range rpcFilter.GetAddresses() {
		addr, err := bchutil.DecodeAddress(addrStr, params)
		if err != nil {
			return fmt.Errorf("unable to decode address '%v': %v", addrStr, err)
		}
		f.RemoveAddress(addr)
	}
	for _, dataElement := range rpcFilter.GetDataElements() {
		f.RemoveDataElement(dataElement)
	}
	f.matchAll = rpcFilter.AllTransactions
	return nil
}
func ( f * txFilter ) RemoveRPCFilter ( rpcFilter * pb . TransactionFilter , params * chaincfg . Params ) error { if rpcFilter == nil { return nil } for _ , op := range rpcFilter . GetOutpoints ( ) { hash , err := chainhash . NewHash ( op . GetHash ( ) ) if err != nil { return err } f . RemoveOutpoint ( wire . OutPoint { Hash : * hash , Index : op . GetIndex ( ) } ) } for _ , addrStr := range rpcFilter . GetAddresses ( ) { addr , err := bchutil . DecodeAddress ( addrStr , params ) if err != nil { return fmt . Errorf ( " " , addrStr , err ) } f . RemoveAddress ( addr ) } for _ , dataElement := range rpcFilter . GetDataElements ( ) { f . RemoveDataElement ( dataElement ) } f . matchAll = rpcFilter . AllTransactions return nil }
RemoveRPCFilter removes all filter properties from the
pb.TransactionFilter from the filter.
RemoveRPCFilter removes all filter properties from the pb . TransactionFilter from the filter .
// Remove outpoints. // Interpret and remove addresses. // Remove data elements