mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
UNLReport ImportVLKey voting working
This commit is contained in:
@@ -197,7 +197,7 @@ Change::applyUNLReport()
|
|||||||
auto canonicalize = [&](SField const& arrayType, SField const& objType) -> std::vector<STObject>
|
auto canonicalize = [&](SField const& arrayType, SField const& objType) -> std::vector<STObject>
|
||||||
{
|
{
|
||||||
auto const existing =
|
auto const existing =
|
||||||
reset
|
reset || !sle->isFieldPresent(arrayType)
|
||||||
? STArray(arrayType)
|
? STArray(arrayType)
|
||||||
: sle->getFieldArray(arrayType);
|
: sle->getFieldArray(arrayType);
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ Change::applyUNLReport()
|
|||||||
{
|
{
|
||||||
auto pk =
|
auto pk =
|
||||||
const_cast<ripple::STTx&>(ctx_.tx)
|
const_cast<ripple::STTx&>(ctx_.tx)
|
||||||
.getField(arrayType)
|
.getField(objType)
|
||||||
.downcast<STObject>()
|
.downcast<STObject>()
|
||||||
.getFieldVL(sfPublicKey);
|
.getFieldVL(sfPublicKey);
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ Change::applyUNLReport()
|
|||||||
out.reserve(ordered.size());
|
out.reserve(ordered.size());
|
||||||
for (auto const& k: ordered)
|
for (auto const& k: ordered)
|
||||||
{
|
{
|
||||||
out.emplace_back(sfActiveValidator);
|
out.emplace_back(objType);
|
||||||
out.back().setFieldVL(sfPublicKey, k);
|
out.back().setFieldVL(sfPublicKey, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ LedgerFormats::LedgerFormats()
|
|||||||
add(jss::UNLReport,
|
add(jss::UNLReport,
|
||||||
ltUNL_REPORT,
|
ltUNL_REPORT,
|
||||||
{
|
{
|
||||||
{sfImportVLKeys, soeREQUIRED},
|
{sfImportVLKeys, soeOPTIONAL},
|
||||||
{sfActiveValidators, soeREQUIRED},
|
{sfActiveValidators, soeOPTIONAL},
|
||||||
{sfPreviousTxnID, soeREQUIRED},
|
{sfPreviousTxnID, soeREQUIRED},
|
||||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user