The method at multi_index_block.cpp that does the serialization of the state object to BSON is manually constructing the BSON instead of relying on the auto-generated class from theĀ resumable_index_build.idl file.
It's recommended to use the class with its serialization methods to avoid human error when serializing.