@@ -21,7 +21,6 @@ use storage::{
21
21
} ;
22
22
#[ cfg( feature = "read_old_db" ) ]
23
23
use storage:: block_db:: BlockDb ;
24
- use ton_api:: ton:: PublicKey ;
25
24
use ton_block:: { Block , BlockIdExt , AccountIdPrefixFull , UnixTime32 } ;
26
25
use ton_types:: { error, fail, Result , UInt256 } ;
27
26
@@ -410,7 +409,7 @@ impl InternalDb for InternalDbImpl {
410
409
let handle = result. clone ( ) . as_non_updated ( ) . ok_or_else (
411
410
|| error ! ( "INTERNAL ERROR: block {} result mismatch in store_block_data {:?}" , block. id( ) , result)
412
411
) ?;
413
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: Block ( block. id ( ) ) ;
412
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: Block ( block. id ( ) ) ;
414
413
if !handle. has_data ( ) || !self . archive_manager . check_file ( & handle, & entry_id) {
415
414
let _lock = handle. block_file_lock ( ) . write ( ) . await ;
416
415
if !handle. has_data ( ) || !self . archive_manager . check_file ( & handle, & entry_id) {
@@ -440,7 +439,7 @@ impl InternalDb for InternalDbImpl {
440
439
return Ok ( raw_block. to_vec ( ) ) ;
441
440
}
442
441
#[ cfg( not( feature = "read_old_db" ) ) ] {
443
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: Block ( handle. id ( ) ) ;
442
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: Block ( handle. id ( ) ) ;
444
443
self . archive_manager . get_file ( handle, & entry_id) . await
445
444
}
446
445
}
@@ -498,15 +497,15 @@ impl InternalDb for InternalDbImpl {
498
497
|| error ! ( "INTERNAL ERROR: block {} result mismatch in store_block_proof" , id)
499
498
) ?;
500
499
if proof. is_link ( ) {
501
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: ProofLink ( id) ;
500
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: ProofLink ( id) ;
502
501
if !handle. has_proof_link ( ) ||
503
502
!self . archive_manager . check_file ( & handle, & entry_id)
504
503
{
505
504
let _lock = handle. proof_file_lock ( ) . write ( ) . await ;
506
505
if !handle. has_proof_link ( ) ||
507
506
!self . archive_manager . check_file ( & handle, & entry_id)
508
507
{
509
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: ProofLink ( id) ;
508
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: ProofLink ( id) ;
510
509
self . archive_manager . add_file ( & entry_id, proof. data ( ) . to_vec ( ) ) . await ?;
511
510
if handle. set_proof_link ( ) {
512
511
self . store_block_handle ( & handle, callback) ?;
@@ -515,15 +514,15 @@ impl InternalDb for InternalDbImpl {
515
514
}
516
515
}
517
516
} else {
518
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: Proof ( id) ;
517
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: Proof ( id) ;
519
518
if !handle. has_proof ( ) ||
520
519
!self . archive_manager . check_file ( & handle, & entry_id)
521
520
{
522
521
let _lock = handle. proof_file_lock ( ) . write ( ) . await ;
523
522
if !handle. has_proof ( ) ||
524
523
!self . archive_manager . check_file ( & handle, & entry_id)
525
524
{
526
- let entry_id = PackageEntryId :: < _ , UInt256 , PublicKey > :: Proof ( id) ;
525
+ let entry_id = PackageEntryId :: < _ , UInt256 , UInt256 > :: Proof ( id) ;
527
526
self . archive_manager . add_file ( & entry_id, proof. data ( ) . to_vec ( ) ) . await ?;
528
527
if handle. set_proof ( ) {
529
528
self . store_block_handle ( & handle, callback) ?;
@@ -557,9 +556,9 @@ impl InternalDb for InternalDbImpl {
557
556
async fn load_block_proof_raw ( & self , handle : & BlockHandle , is_link : bool ) -> Result < Vec < u8 > > {
558
557
log:: trace!( "load_block_proof_raw {} {}" , if is_link { "link" } else { "" } , handle. id( ) ) ;
559
558
let ( entry_id, inited) = if is_link {
560
- ( PackageEntryId :: < _ , UInt256 , PublicKey > :: ProofLink ( handle. id ( ) ) , handle. has_proof_link ( ) )
559
+ ( PackageEntryId :: < _ , UInt256 , UInt256 > :: ProofLink ( handle. id ( ) ) , handle. has_proof_link ( ) )
561
560
} else {
562
- ( PackageEntryId :: < _ , UInt256 , PublicKey > :: Proof ( handle. id ( ) ) , handle. has_proof ( ) )
561
+ ( PackageEntryId :: < _ , UInt256 , UInt256 > :: Proof ( handle. id ( ) ) , handle. has_proof ( ) )
563
562
} ;
564
563
if !inited {
565
564
fail ! ( "This proof{} is not in the archive: {:?}" , if is_link { "link" } else { "" } , handle) ;
0 commit comments