diff --git a/src/ripple/app/tx/impl/Change.cpp b/src/ripple/app/tx/impl/Change.cpp index a1f4f62a7..e1fc131d7 100644 --- a/src/ripple/app/tx/impl/Change.cpp +++ b/src/ripple/app/tx/impl/Change.cpp @@ -197,7 +197,7 @@ Change::applyUNLReport() auto canonicalize = [&](SField const& arrayType, SField const& objType) -> std::vector { auto const existing = - reset + reset || !sle->isFieldPresent(arrayType) ? STArray(arrayType) : sle->getFieldArray(arrayType); @@ -216,7 +216,7 @@ Change::applyUNLReport() { auto pk = const_cast(ctx_.tx) - .getField(arrayType) + .getField(objType) .downcast() .getFieldVL(sfPublicKey); @@ -228,7 +228,7 @@ Change::applyUNLReport() out.reserve(ordered.size()); for (auto const& k: ordered) { - out.emplace_back(sfActiveValidator); + out.emplace_back(objType); out.back().setFieldVL(sfPublicKey, k); } diff --git a/src/ripple/protocol/impl/LedgerFormats.cpp b/src/ripple/protocol/impl/LedgerFormats.cpp index 98a47adcc..b3f81ef4a 100644 --- a/src/ripple/protocol/impl/LedgerFormats.cpp +++ b/src/ripple/protocol/impl/LedgerFormats.cpp @@ -303,8 +303,8 @@ LedgerFormats::LedgerFormats() add(jss::UNLReport, ltUNL_REPORT, { - {sfImportVLKeys, soeREQUIRED}, - {sfActiveValidators, soeREQUIRED}, + {sfImportVLKeys, soeOPTIONAL}, + {sfActiveValidators, soeOPTIONAL}, {sfPreviousTxnID, soeREQUIRED}, {sfPreviousTxnLgrSeq, soeREQUIRED}, },