With the addition of support for notices in the pebble state, there was a small bug introduced in ReadState, which was not updated to set the new noticeCond. As a result, a call to WaitNotices from a state which was created via ReadState will cause a null pointer exception.
This PR adds the proper noticeCond initialization in ReadState, as well as a unit test to check that WaitNotices does not panic on a state which was created via ReadState.
Trivial fix, merged without further review. I just applied the code review nits directly, as I needed this change for something I'm working on too. Thanks @olivercalder!
With the addition of support for notices in the pebble state, there was a small bug introduced in
ReadState
, which was not updated to set the newnoticeCond
. As a result, a call toWaitNotices
from a state which was created viaReadState
will cause a null pointer exception.This PR adds the proper
noticeCond
initialization inReadState
, as well as a unit test to check thatWaitNotices
does not panic on a state which was created viaReadState
.