mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-08-25 14:51:14 +00:00
fix tests
This commit is contained in:
@@ -533,25 +533,49 @@ mod tests {
|
||||
.key_map
|
||||
.get_mut(&ChainIndex::from_str("/1").unwrap())
|
||||
.unwrap();
|
||||
acc.value.1.push((0, nssa::Account { balance: 2, ..nssa::Account::default() }));
|
||||
acc.value.1.push((
|
||||
0,
|
||||
nssa::Account {
|
||||
balance: 2,
|
||||
..nssa::Account::default()
|
||||
},
|
||||
));
|
||||
|
||||
let acc = tree
|
||||
.key_map
|
||||
.get_mut(&ChainIndex::from_str("/2").unwrap())
|
||||
.unwrap();
|
||||
acc.value.1.push((0, nssa::Account { balance: 3, ..nssa::Account::default() }));
|
||||
acc.value.1.push((
|
||||
0,
|
||||
nssa::Account {
|
||||
balance: 3,
|
||||
..nssa::Account::default()
|
||||
},
|
||||
));
|
||||
|
||||
let acc = tree
|
||||
.key_map
|
||||
.get_mut(&ChainIndex::from_str("/0/1").unwrap())
|
||||
.unwrap();
|
||||
acc.value.1.push((0, nssa::Account { balance: 5, ..nssa::Account::default() }));
|
||||
acc.value.1.push((
|
||||
0,
|
||||
nssa::Account {
|
||||
balance: 5,
|
||||
..nssa::Account::default()
|
||||
},
|
||||
));
|
||||
|
||||
let acc = tree
|
||||
.key_map
|
||||
.get_mut(&ChainIndex::from_str("/1/0").unwrap())
|
||||
.unwrap();
|
||||
acc.value.1.push((0, nssa::Account { balance: 6, ..nssa::Account::default() }));
|
||||
acc.value.1.push((
|
||||
0,
|
||||
nssa::Account {
|
||||
balance: 6,
|
||||
..nssa::Account::default()
|
||||
},
|
||||
));
|
||||
|
||||
// Update account_id_map for nodes that now have entries
|
||||
for chain_index_str in ["/1", "/2", "/0/1", "/1/0"] {
|
||||
|
||||
@@ -174,7 +174,13 @@ mod tests {
|
||||
// /2
|
||||
let second_chain_index = key_tree_private.generate_new_node_layered().unwrap();
|
||||
|
||||
key_tree_private.key_map.get(&second_chain_index).expect("Node was just inserted").value.0.clone()
|
||||
key_tree_private
|
||||
.key_map
|
||||
.get(&second_chain_index)
|
||||
.expect("Node was just inserted")
|
||||
.value
|
||||
.0
|
||||
.clone()
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user