mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
dump
This commit is contained in:
@@ -47,7 +47,7 @@ using namespace ripple;
|
||||
static const std::map<uint16_t, uint8_t> TSHAllowances = {
|
||||
{ttPAYMENT, tshROLLBACK},
|
||||
{ttESCROW_CREATE, tshROLLBACK},
|
||||
{ttESCROW_FINISH, tshROLLBACK},
|
||||
{ttESCROW_FINISH, tshCOLLECT},
|
||||
{ttACCOUNT_SET, tshNONE},
|
||||
{ttESCROW_CANCEL, tshCOLLECT},
|
||||
{ttREGULAR_KEY_SET, tshROLLBACK},
|
||||
|
||||
@@ -300,14 +300,15 @@ getTransactionalStakeHolders(STTx const& tx, ReadView const& rv)
|
||||
|
||||
case ttESCROW_CANCEL:
|
||||
case ttESCROW_FINISH: {
|
||||
if (!tx.isFieldPresent(sfOwner) ||
|
||||
!tx.isFieldPresent(sfOfferSequence) ||
|
||||
if (!tx.isFieldPresent(sfOwner))
|
||||
return {};
|
||||
|
||||
if (!tx.isFieldPresent(sfOfferSequence) &&
|
||||
!tx.isFieldPresent(sfEscrowID))
|
||||
return {};
|
||||
|
||||
std::optional<uint256> escrowID = tx.getFieldH256(sfEscrowID);
|
||||
std::optional<std::uint32_t> offerSeq =
|
||||
tx.getFieldU32(sfOfferSequence);
|
||||
std::optional<uint256> escrowID = tx[~sfEscrowID];
|
||||
std::optional<std::uint32_t> offerSeq = tx[~sfOfferSequence];
|
||||
|
||||
Keylet k = escrowID
|
||||
? Keylet(ltESCROW, *escrowID)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/protocol/TxFlags.h>
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <test/jtx/network.h>
|
||||
@@ -48,6 +49,43 @@ makeNetworkConfig(
|
||||
});
|
||||
}
|
||||
|
||||
std::unique_ptr<Config>
|
||||
makeNetworkVLConfig(
|
||||
uint32_t networkID,
|
||||
std::string fee,
|
||||
std::string a_res,
|
||||
std::string o_res,
|
||||
std::vector<std::string> keys)
|
||||
{
|
||||
using namespace jtx;
|
||||
return envconfig([&](std::unique_ptr<Config> cfg) {
|
||||
cfg->NETWORK_ID = networkID;
|
||||
Section config;
|
||||
config.append(
|
||||
{"reference_fee = " + fee,
|
||||
"account_reserve = " + a_res,
|
||||
"owner_reserve = " + o_res});
|
||||
auto setup = setup_FeeVote(config);
|
||||
cfg->FEES = setup;
|
||||
|
||||
for (auto const& strPk : keys)
|
||||
{
|
||||
auto pkHex = strUnHex(strPk);
|
||||
if (!pkHex)
|
||||
Throw<std::runtime_error>(
|
||||
"Import VL Key '" + strPk + "' was not valid hex.");
|
||||
|
||||
auto const pkType = publicKeyType(makeSlice(*pkHex));
|
||||
if (!pkType)
|
||||
Throw<std::runtime_error>(
|
||||
"Import VL Key '" + strPk + "' was not a valid key type.");
|
||||
|
||||
cfg->IMPORT_VL_KEYS.emplace(strPk, makeSlice(*pkHex));
|
||||
}
|
||||
return cfg;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace network
|
||||
|
||||
} // namespace jtx
|
||||
|
||||
@@ -37,6 +37,14 @@ makeNetworkConfig(
|
||||
std::string a_res,
|
||||
std::string o_res);
|
||||
|
||||
std::unique_ptr<Config>
|
||||
makeNetworkVLConfig(
|
||||
uint32_t networkID,
|
||||
std::string fee,
|
||||
std::string a_res,
|
||||
std::string o_res,
|
||||
std::vector<std::string> keys);
|
||||
|
||||
} // namespace network
|
||||
|
||||
} // namespace jtx
|
||||
|
||||
Reference in New Issue
Block a user