Skip to content

Commit

Permalink
Merge pull request #2184 from blockstack/fix/chainstate-loading
Browse files Browse the repository at this point in the history
Fix: chainstate import discrepancy
  • Loading branch information
lgalabru authored Dec 16, 2020
2 parents 30828bf + cb99a3a commit d491d91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/chainstate/stacks/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use rusqlite::Row;
use rusqlite::Transaction;
use rusqlite::NO_PARAMS;

use std::collections::{hash_map::Entry, HashMap};
use std::collections::{btree_map::Entry, BTreeMap};
use std::fmt;
use std::fs;
use std::io;
Expand Down Expand Up @@ -959,7 +959,7 @@ impl StacksChainState {

if let Some(get_schedules) = boot_data.get_bulk_initial_lockups.take() {
info!("Initializing chain with lockups");
let mut lockups_per_block: HashMap<u64, Vec<Value>> = HashMap::new();
let mut lockups_per_block: BTreeMap<u64, Vec<Value>> = BTreeMap::new();
let initial_lockups = get_schedules();
for schedule in initial_lockups {
let stx_address =
Expand All @@ -981,6 +981,7 @@ impl StacksChainState {
}
};
}

let lockup_contract_id = boot_code_id("lockup");
clarity_tx.connection().as_transaction(|clarity| {
clarity
Expand Down
2 changes: 1 addition & 1 deletion testnet/stacks-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl ConfigFile {
rpc_port: Some(18332),
peer_port: Some(18333),
peer_host: Some("bitcoind.xenon.blockstack.org".to_string()),
magic_bytes: Some("Xe".into()),
magic_bytes: Some("X2".into()),
..BurnchainConfigFile::default()
};

Expand Down
2 changes: 1 addition & 1 deletion testnet/stacks-node/src/tests/neon_integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn neon_integration_test_conf() -> (Config, StacksAddress) {
let magic_bytes = Config::from_config_file(ConfigFile::xenon())
.burnchain
.magic_bytes;
assert_eq!(magic_bytes.as_bytes(), &['X' as u8, 'e' as u8]);
assert_eq!(magic_bytes.as_bytes(), &['X' as u8, '2' as u8]);
conf.burnchain.magic_bytes = magic_bytes;
conf.burnchain.poll_time_secs = 1;
conf.node.pox_sync_sample_secs = 1;
Expand Down

0 comments on commit d491d91

Please sign in to comment.