@@ -309,7 +309,6 @@ def parse_block(
309
309
previous_ledger_hash = None ,
310
310
previous_txlist_hash = None ,
311
311
previous_messages_hash = None ,
312
- previous_migration_hash = None ,
313
312
reparsing = False ,
314
313
):
315
314
"""Parse the block, return hash of new ledger, txlist and messages.
@@ -379,12 +378,6 @@ def parse_block(
379
378
previous_messages_hash ,
380
379
ledger .currentstate .ConsensusHashBuilder ().block_journal (),
381
380
)
382
- new_migration_hash , _found_migration_hash = check .consensus_hash (
383
- db ,
384
- "migration_hash" ,
385
- previous_migration_hash ,
386
- ledger .currentstate .ConsensusHashBuilder ().block_migration (),
387
- )
388
381
389
382
# Update block
390
383
@@ -394,15 +387,13 @@ def parse_block(
394
387
txlist_hash=:txlist_hash,
395
388
ledger_hash=:ledger_hash,
396
389
messages_hash=:messages_hash,
397
- migration_hash=:migration_hash,
398
390
transaction_count=:transaction_count
399
391
WHERE block_index=:block_index
400
392
"""
401
393
update_block_bindings = {
402
394
"txlist_hash" : new_txlist_hash ,
403
395
"ledger_hash" : new_ledger_hash ,
404
396
"messages_hash" : new_messages_hash ,
405
- "migration_hash" : new_migration_hash ,
406
397
"transaction_count" : len (transactions ),
407
398
"block_index" : block_index ,
408
399
}
@@ -420,14 +411,13 @@ def parse_block(
420
411
"ledger_hash" : new_ledger_hash ,
421
412
"txlist_hash" : new_txlist_hash ,
422
413
"messages_hash" : new_messages_hash ,
423
- "migration_hash" : new_migration_hash ,
424
414
"transaction_count" : len (transactions ),
425
415
},
426
416
)
427
417
428
418
cursor .close ()
429
419
430
- return new_ledger_hash , new_txlist_hash , new_messages_hash , new_migration_hash
420
+ return new_ledger_hash , new_txlist_hash , new_messages_hash
431
421
432
422
cursor .close ()
433
423
return None , None , None , None
@@ -653,21 +643,18 @@ def reparse(db, block_index=0):
653
643
previous_ledger_hash = None
654
644
previous_txlist_hash = None
655
645
previous_messages_hash = None
656
- previous_migration_hash = None
657
646
if CurrentState ().current_block_index () > config .BLOCK_FIRST :
658
647
previous_block = ledger .blocks .get_block (db , block ["block_index" ] - 1 )
659
648
previous_ledger_hash = previous_block ["ledger_hash" ]
660
649
previous_txlist_hash = previous_block ["txlist_hash" ]
661
650
previous_messages_hash = previous_block ["messages_hash" ]
662
- previous_migration_hash = previous_block ["migration_hash" ]
663
651
parse_block (
664
652
db ,
665
653
block ["block_index" ],
666
654
block ["block_time" ],
667
655
previous_ledger_hash = previous_ledger_hash ,
668
656
previous_txlist_hash = previous_txlist_hash ,
669
657
previous_messages_hash = previous_messages_hash ,
670
- previous_migration_hash = previous_migration_hash ,
671
658
reparsing = True ,
672
659
)
673
660
block_parsed_count += 1
@@ -754,7 +741,6 @@ def parse_new_block(db, decoded_block, tx_index=None):
754
741
"ledger_hash" : None ,
755
742
"txlist_hash" : None ,
756
743
"messages_hash" : None ,
757
- "migration_hash" : None ,
758
744
"block_index" : config .BLOCK_FIRST - 1 ,
759
745
}
760
746
else :
@@ -799,21 +785,19 @@ def parse_new_block(db, decoded_block, tx_index=None):
799
785
decoded_tx = transaction ,
800
786
)
801
787
# Parse the transactions in the block.
802
- new_ledger_hash , new_txlist_hash , new_messages_hash , new_migration_hash = parse_block (
788
+ new_ledger_hash , new_txlist_hash , new_messages_hash = parse_block (
803
789
db ,
804
790
decoded_block ["block_index" ],
805
791
decoded_block ["block_time" ],
806
792
previous_ledger_hash = previous_block ["ledger_hash" ],
807
793
previous_txlist_hash = previous_block ["txlist_hash" ],
808
794
previous_messages_hash = previous_block ["messages_hash" ],
809
- previous_migration_hash = previous_block ["migration_hash" ],
810
795
)
811
796
812
797
duration = time .time () - start_time
813
798
814
799
log_message = "Block %(block_index)s - Parsing complete. "
815
800
log_message += "L: %(ledger_hash)s, "
816
- log_message += "L2: %(migration_hash)s, "
817
801
log_message += "TX: %(txlist_hash)s, "
818
802
log_message += "M: %(messages_hash)s "
819
803
log_message += "(%(duration).2fs)"
@@ -824,7 +808,6 @@ def parse_new_block(db, decoded_block, tx_index=None):
824
808
"ledger_hash" : new_ledger_hash ,
825
809
"txlist_hash" : new_txlist_hash ,
826
810
"messages_hash" : new_messages_hash ,
827
- "migration_hash" : new_migration_hash ,
828
811
"duration" : duration ,
829
812
},
830
813
)
0 commit comments