File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -446,11 +446,14 @@ class CDiskBlockIndex : public CBlockIndex
446446 READWRITE (obj.hashPrev );
447447 READWRITE (obj.hashMerkleRoot );
448448 READWRITE (obj.nTime );
449+
450+ // Allocate objects in the optional<> fields when reading, since READWRITE will not do this
451+ SER_READ (obj, obj.m_dynafed_params = DynaFedParams ());
452+ SER_READ (obj, obj.m_signblock_witness = CScriptWitness ());
453+ SER_READ (obj, obj.proof = CProof ());
454+
449455 // For compatibility with elements 0.14 based chains
450456 if (g_signed_blocks) {
451- SER_READ (obj, obj.m_dynafed_params = DynaFedParams ());
452- SER_READ (obj, obj.m_signblock_witness = CScriptWitness ());
453- SER_READ (obj, obj.proof = CProof ());
454457 if (is_dyna) {
455458 READWRITE (obj.m_dynafed_params .value ());
456459 READWRITE (obj.m_signblock_witness .value ().stack );
You can’t perform that action at this time.
0 commit comments