File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ pub enum PreCachedDBError {
3939 BlockNotSet ( ) ,
4040 #[ error( "Tycho Client error: {0}" ) ]
4141 TychoClientError ( #[ from] TychoClientError ) ,
42+ #[ error( "{0}" ) ]
43+ Fatal ( String ) ,
4244}
4345
4446impl DBErrorMarker for PreCachedDBError { }
@@ -286,8 +288,8 @@ impl DatabaseRef for PreCachedDB {
286288 . ok_or ( PreCachedDBError :: MissingAccount ( address) )
287289 }
288290
289- fn code_by_hash_ref ( & self , _code_hash : B256 ) -> Result < Bytecode , Self :: Error > {
290- panic ! ( "Code by hash is not implemented" )
291+ fn code_by_hash_ref ( & self , code_hash : B256 ) -> Result < Bytecode , Self :: Error > {
292+ Err ( PreCachedDBError :: Fatal ( format ! ( "Code by hash not supported: {code_hash}" ) ) )
291293 }
292294
293295 /// Retrieves the storage value at the specified address and index.
You can’t perform that action at this time.
0 commit comments