mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
This commit is contained in:
@@ -73,7 +73,7 @@ Import::getInnerTxn(STTx const& outer, beast::Journal const& j,Json::Value const
|
|||||||
|
|
||||||
std::optional<Json::Value> xpop_storage;
|
std::optional<Json::Value> xpop_storage;
|
||||||
|
|
||||||
if (!xpop)
|
if (!xpop && outer.isFieldPresent(sfBlob))
|
||||||
{
|
{
|
||||||
xpop_storage = syntaxCheckXPOP(outer.getFieldVL(sfBlob), j);
|
xpop_storage = syntaxCheckXPOP(outer.getFieldVL(sfBlob), j);
|
||||||
xpop = &(*xpop_storage);
|
xpop = &(*xpop_storage);
|
||||||
@@ -142,6 +142,14 @@ Import::preflight(PreflightContext const& ctx)
|
|||||||
|
|
||||||
auto& tx = ctx.tx;
|
auto& tx = ctx.tx;
|
||||||
|
|
||||||
|
if (!tx.isFieldPresent(sfBlob))
|
||||||
|
{
|
||||||
|
JLOG(ctx.j.warn())
|
||||||
|
<< "Import: sfBlob was missing (should be impossible) "
|
||||||
|
<< tx.getTransactionID();
|
||||||
|
return temMALFORMED;
|
||||||
|
}
|
||||||
|
|
||||||
if (tx.getFieldVL(sfBlob).size() > (512 * 1024))
|
if (tx.getFieldVL(sfBlob).size() > (512 * 1024))
|
||||||
{
|
{
|
||||||
JLOG(ctx.j.warn())
|
JLOG(ctx.j.warn())
|
||||||
@@ -843,6 +851,9 @@ Import::preclaim(PreclaimContext const& ctx)
|
|||||||
if (!ctx.view.rules().enabled(featureImport))
|
if (!ctx.view.rules().enabled(featureImport))
|
||||||
return temDISABLED;
|
return temDISABLED;
|
||||||
|
|
||||||
|
if (!ctx.tx.isFieldPresent(sfBlob))
|
||||||
|
return tefINTERNAL;
|
||||||
|
|
||||||
// parse blob as json
|
// parse blob as json
|
||||||
auto const xpop =
|
auto const xpop =
|
||||||
syntaxCheckXPOP(ctx.tx.getFieldVL(sfBlob), ctx.j);
|
syntaxCheckXPOP(ctx.tx.getFieldVL(sfBlob), ctx.j);
|
||||||
@@ -1094,6 +1105,9 @@ Import::doApply()
|
|||||||
if (!view().rules().enabled(featureImport))
|
if (!view().rules().enabled(featureImport))
|
||||||
return temDISABLED;
|
return temDISABLED;
|
||||||
|
|
||||||
|
if (!ctx_.tx.isFieldPresent(sfBlob))
|
||||||
|
return tefINTERNAL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Before starting decode and validate XPOP, update ImportVL seq
|
// Before starting decode and validate XPOP, update ImportVL seq
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user