Rework the validation helper functions in state.rs so they just update the state but don't validate it against the proposed header. The caller then can just update the state and check against the proposed header at the end. This will allow us to reuse the state update functions in Header::new, which would reduce the risk of bugs where Header::new and validate_and_apply_header are inconsistent.
Rework the validation helper functions in
state.rs
so they just update the state but don't validate it against the proposed header. The caller then can just update the state and check against the proposed header at the end. This will allow us to reuse the state update functions inHeader::new
, which would reduce the risk of bugs whereHeader::new
andvalidate_and_apply_header
are inconsistent.