Closed dan-da closed 1 year ago
Very good job. The code looks perfect
all except 2 unwrap/expect are removed from node.rs
But I think there are still more places causing panic
like the HashMap
accesses made in add_block
, that are of the type: self.map[hash]
But I think there are still more places causing
panic
like theHashMap
accesses made inadd_block
, that are of the type:self.map[hash]
yeah, I've just been going after unwrap/expect until now. I intend to make another pass for array index stuff.
I intend to make another pass for array index stuff.
That would be in another PR, correct?
yes, in another PR I mean. trying to keep them as small/focused as I can so easier to review.
Addresses #247 (more to come)
When combined with #265, all except 2 unwrap/expect are removed from node.rs. The remaining 2 expect occurrences are Mutex::lock().expect(), which I consider acceptable (necessary evil) for now.
This PR endeavors to keep the overall logic the same, except that:
node.rs
persistence.rs
util.rs