@@ -79,14 +79,31 @@ pub fn build_tx_hashfilters<'a>(env: Env<'a>, txus: Vec<Term<'a>>) -> NifResult<
7979 all_filters. push ( ( bin. into ( ) , tx_hash8) ) ;
8080 } ;
8181
82- push_key ( & [ signer, ZERO , ZERO , ZERO ] ) ;
83- push_key ( & [ ZERO , arg0, ZERO , ZERO ] ) ;
84- push_key ( & [ signer, arg0, ZERO , ZERO ] ) ;
85- push_key ( & [ signer, ZERO , contract, ZERO ] ) ;
86- push_key ( & [ signer, ZERO , contract, func] ) ;
87- push_key ( & [ ZERO , arg0, contract, ZERO ] ) ;
88- push_key ( & [ ZERO , arg0, contract, func] ) ;
89- push_key ( & [ signer, arg0, contract, func] ) ;
82+ match ( contract, func) {
83+ ( b"Epoch" , b"submit_sol" ) => {
84+ push_key ( & [ signer, ZERO , ZERO , ZERO ] ) ;
85+ push_key ( & [ ZERO , arg0, ZERO , ZERO ] ) ;
86+ // Do we care about this?
87+ // tx_filter CF goes from 10G to 22G if we add this back
88+ // reevaluate later difference is OK
89+ push_key ( & [ signer, ZERO , contract, ZERO ] ) ;
90+ push_key ( & [ signer, ZERO , contract, func] ) ;
91+ push_key ( & [ ZERO , ZERO , contract, ZERO ] ) ;
92+ push_key ( & [ ZERO , ZERO , contract, func] ) ;
93+ } ,
94+ _ => {
95+ push_key ( & [ signer, ZERO , ZERO , ZERO ] ) ;
96+ push_key ( & [ ZERO , arg0, ZERO , ZERO ] ) ;
97+ push_key ( & [ signer, arg0, ZERO , ZERO ] ) ;
98+ push_key ( & [ ZERO , ZERO , contract, ZERO ] ) ;
99+ push_key ( & [ ZERO , ZERO , contract, func] ) ;
100+ push_key ( & [ signer, ZERO , contract, ZERO ] ) ;
101+ push_key ( & [ signer, ZERO , contract, func] ) ;
102+ push_key ( & [ ZERO , arg0, contract, ZERO ] ) ;
103+ push_key ( & [ ZERO , arg0, contract, func] ) ;
104+ push_key ( & [ signer, arg0, contract, func] ) ;
105+ }
106+ }
90107 }
91108
92109 Ok ( all_filters)
@@ -157,7 +174,7 @@ pub fn query_tx_hashfilter<'a, 'db>(env: Env<'a>, db: &'db TransactionDB<MultiTh
157174
158175 let tx_prefix_8 = iter_txfilter. value ( ) . unwrap ( ) ;
159176
160- // --- Inner Scan: Resolve Tx Hash Collisions ---
177+ // TODO: check for collisions when signer/arg0/contract/function is used
161178 iter_tx. seek ( tx_prefix_8) ;
162179 while iter_tx. valid ( ) {
163180 match iter_tx. key ( ) {
0 commit comments