citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

filtering with cutomized boolean operation #439

Open yya518 opened 3 years ago

yya518 commented 3 years ago

Hello, I have a question about the Python fluent Interface. Say if I want to filter out a block's input address that is in a set of candidate addresses, I would like to use the following code:

candidate_set = set(some addresses) 
chain[500000].inputs.address.where( lambda addr: addr in candidate_set )

This does not seem to work. I wonder if the filtering function in blocksci can support customized boolean operation. Thanks.