Skip to content

Commit 40f836f

Browse files
author
Seulgi Kim
committed
Add debug_assert in initialize_accounts
Currently, it just returns the error when insertion fails. This patch adds debug_assert to check the insertion on the test. It will not affect on release binary, but it makes the test give more information.
1 parent cb48718 commit 40f836f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/spec/spec.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ impl Spec {
136136
let mut t = trie_factory.create(db.as_hashdb_mut(), &mut root);
137137

138138
for (address, account) in &*self.genesis_state {
139-
let r = t.insert(&**address, &account.rlp_bytes())?;
140-
debug_assert_eq!(None, r);
139+
let r = t.insert(&**address, &account.rlp_bytes());
140+
debug_assert_eq!(Ok(None), r);
141+
r?;
141142
}
142143
}
143144

0 commit comments

Comments
 (0)