ParsedBoardState's (with this change, previously just ProtoBoardState's) contain a reference to a ChannelMetadata proto. This reference comes from BoardRules::ParseState, and is must be valid as long as the ParsedBoardState instance is alive.
This assumption was violated previously in RollingBoardState, because we used a temporary metadata instance rather than the copy stored in a reinit entry for parsing the states. With this change, we fix this, so that no bad references are used.
ParsedBoardState
's (with this change, previously justProtoBoardState
's) contain a reference to aChannelMetadata
proto. This reference comes fromBoardRules::ParseState
, and is must be valid as long as theParsedBoardState
instance is alive.This assumption was violated previously in
RollingBoardState
, because we used a temporary metadata instance rather than the copy stored in a reinit entry for parsing the states. With this change, we fix this, so that no bad references are used.