best block resolve fix

This commit is contained in:
NikVolf 2016-12-15 14:33:17 +01:00
parent 3d1db18f3c
commit 3c162ac867
2 changed files with 3 additions and 3 deletions

View File

@ -156,8 +156,8 @@ impl Storage {
if best_number.is_some() { if best_number.is_some() {
*storage.best_block.write() = Some( *storage.best_block.write() = Some(
BestBlock { BestBlock {
number: best_number.expect("is_some() is checked above for block number"), number: best_number.expect("best.number.is_some() is checked above; qed"),
hash: best_hash.expect("is_some() is checked above for block hash"), hash: best_hash.expect("best_number.is_some() is equal to best_hash.is_some(); best_number.is_some() = true checked above; so best_hash.is_some() is also true; qed"),
} }
); );
} }

View File

@ -70,7 +70,7 @@ impl TransactionMeta {
} }
pub fn is_spent(&self, idx: usize) -> Option<bool> { pub fn is_spent(&self, idx: usize) -> Option<bool> {
self.bits.get(idx + 1) //.expect("Index should be verified by the caller") self.bits.get(idx + 1)
} }
pub fn is_fully_spent(&self) -> bool { pub fn is_fully_spent(&self) -> bool {