UNLReport ImportVLKey voting working

This commit is contained in:
Richard Holland
2023-06-26 08:53:26 +00:00
parent d70ec5d2e4
commit 29e733cab3
2 changed files with 5 additions and 5 deletions

View File

@@ -197,7 +197,7 @@ Change::applyUNLReport()
auto canonicalize = [&](SField const& arrayType, SField const& objType) -> std::vector<STObject>
{
auto const existing =
reset
reset || !sle->isFieldPresent(arrayType)
? STArray(arrayType)
: sle->getFieldArray(arrayType);
@@ -216,7 +216,7 @@ Change::applyUNLReport()
{
auto pk =
const_cast<ripple::STTx&>(ctx_.tx)
.getField(arrayType)
.getField(objType)
.downcast<STObject>()
.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);
}

View File

@@ -303,8 +303,8 @@ LedgerFormats::LedgerFormats()
add(jss::UNLReport,
ltUNL_REPORT,
{
{sfImportVLKeys, soeREQUIRED},
{sfActiveValidators, soeREQUIRED},
{sfImportVLKeys, soeOPTIONAL},
{sfActiveValidators, soeOPTIONAL},
{sfPreviousTxnID, soeREQUIRED},
{sfPreviousTxnLgrSeq, soeREQUIRED},
},