You are dereferencing `rawdb.ReadHeaderNumber` twice here. That method may return `nil`, which would crash here. Maybe some precondition higher up already guarantees that not to be the case, but if so it would be good if you make a comment about that. 