File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -135,17 +135,12 @@ impl BlockFilterRpc for BlockFilterRpcImpl {
135135 scripts : Vec < ScriptStatus > ,
136136 command : Option < SetScriptsCommand > ,
137137 ) -> Result < ( ) > {
138- let ( tx, rx) = std:: sync:: mpsc:: channel ( ) ;
139- let swc = self . swc . clone ( ) ;
140- std:: thread:: spawn ( move || {
141- let mut matched_blocks = swc. matched_blocks ( ) . blocking_write ( ) ;
142- let scripts = scripts. into_iter ( ) . map ( Into :: into) . collect ( ) ;
143- swc. storage ( )
144- . update_filter_scripts ( scripts, command. map ( Into :: into) . unwrap_or_default ( ) ) ;
145- matched_blocks. clear ( ) ;
146- tx. send ( ( ) ) . unwrap ( ) ;
147- } ) ;
148- rx. recv ( ) . unwrap ( ) ;
138+ let mut matched_blocks = self . swc . matched_blocks ( ) . blocking_write ( ) ;
139+ let scripts = scripts. into_iter ( ) . map ( Into :: into) . collect ( ) ;
140+ self . swc
141+ . storage ( )
142+ . update_filter_scripts ( scripts, command. map ( Into :: into) . unwrap_or_default ( ) ) ;
143+ matched_blocks. clear ( ) ;
149144 Ok ( ( ) )
150145 }
151146
You can’t perform that action at this time.
0 commit comments