Skip to content

Commit

Permalink
chore(genesis_verify): swap object export order in verification (#2524)
Browse files Browse the repository at this point in the history
Adjust export order for `RoochToBitcoinAddressMapping` and `BitcoinUTXOStore`.

UTXO have been verified: they're all OP_RETURN

The total cost of reserve checking of UTXO is too long (40+hours), re-order for checking address mapping firstly
  • Loading branch information
popcnt1 committed Aug 27, 2024
1 parent 20efb48 commit bf9d1ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/rooch/src/commands/statedb/commands/genesis_verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,18 @@ fn verify_reverse(
let filter = UTXOFilter::new(input, utxo_output, addr_output, outpoint_inscriptions_map);

let mut writer = ExportWriter::new(None, Some(Box::new(filter)));

ExportCommand::export_object(
&moveos_store_arc,
root_state_root,
BitcoinUTXOStore::object_id(),
RoochToBitcoinAddressMapping::object_id(),
&mut writer,
)?;

ExportCommand::export_object(
&moveos_store_arc,
root_state_root,
RoochToBitcoinAddressMapping::object_id(),
BitcoinUTXOStore::object_id(),
&mut writer,
)?;

Expand Down

0 comments on commit bf9d1ef

Please sign in to comment.