File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
host-listener/src/database Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl TryFrom<u64> for ChainId {
5050 type Error = InvalidChainId ;
5151
5252 fn try_from ( value : u64 ) -> Result < Self , Self :: Error > {
53- if value <= i64:: MAX as u64 {
53+ if i64:: try_from ( value ) . is_ok ( ) {
5454 Ok ( ChainId ( value as i64 ) )
5555 } else {
5656 Err ( InvalidChainId {
Original file line number Diff line number Diff line change @@ -354,11 +354,6 @@ impl Database {
354354 ) -> Result < bool , SqlxError > {
355355 let is_scalar = !scalar_byte. is_zero ( ) ;
356356 let output_handle = result. to_vec ( ) ;
357- let schedule_order =
358- log. block_timestamp
359- . saturating_add ( TimeDuration :: microseconds (
360- log. tx_depth_size as i64 ,
361- ) ) ;
362357 let query = sqlx:: query!(
363358 r#"
364359 INSERT INTO computations (
@@ -384,7 +379,10 @@ impl Database {
384379 log. dependence_chain. to_vec( ) ,
385380 log. transaction_hash. map( |txh| txh. to_vec( ) ) ,
386381 log. is_allowed,
387- schedule_order,
382+ log. block_timestamp
383+ . saturating_add( TimeDuration :: microseconds(
384+ log. tx_depth_size as i64
385+ ) ) ,
388386 !log. is_allowed,
389387 self . chain_id. as_i64( )
390388 ) ;
You can’t perform that action at this time.
0 commit comments