mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
style: Fix JSON style in C++ code (#2262)
This commit is contained in:
@@ -62,21 +62,21 @@ TEST_F(FeedBookChangeTest, Pub)
|
||||
|
||||
static constexpr auto kBOOK_CHANGE_PUBLISH =
|
||||
R"JSON({
|
||||
"type":"bookChanges",
|
||||
"ledger_index":32,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"type": "bookChanges",
|
||||
"ledger_index": 32,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"changes":
|
||||
[
|
||||
{
|
||||
"currency_a":"XRP_drops",
|
||||
"currency_b":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD/0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"volume_a":"2",
|
||||
"volume_b":"2",
|
||||
"high":"-1",
|
||||
"low":"-1",
|
||||
"open":"-1",
|
||||
"close":"-1"
|
||||
"currency_a": "XRP_drops",
|
||||
"currency_b": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD/0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"volume_a": "2",
|
||||
"volume_b": "2",
|
||||
"high": "-1",
|
||||
"low": "-1",
|
||||
"open": "-1",
|
||||
"close": "-1"
|
||||
}
|
||||
]
|
||||
})JSON";
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace util::prometheus;
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr auto kFEED = R"JSON({"test":"test"})JSON";
|
||||
constexpr auto kFEED = R"JSON({"test": "test"})JSON";
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -53,13 +53,13 @@ TEST_F(FeedLedgerTest, SubPub)
|
||||
// the type and txn_count fields
|
||||
static constexpr auto kLEDGER_RESPONSE =
|
||||
R"JSON({
|
||||
"validated_ledgers":"10-30",
|
||||
"ledger_index":30,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"fee_base":1,
|
||||
"reserve_base":3,
|
||||
"reserve_inc":2
|
||||
"validated_ledgers": "10-30",
|
||||
"ledger_index": 30,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"fee_base": 1,
|
||||
"reserve_base": 3,
|
||||
"reserve_inc": 2
|
||||
})JSON";
|
||||
boost::asio::io_context ioContext;
|
||||
boost::asio::spawn(ioContext, [this](boost::asio::yield_context yield) {
|
||||
@@ -73,15 +73,15 @@ TEST_F(FeedLedgerTest, SubPub)
|
||||
|
||||
static constexpr auto kLEDGER_PUB =
|
||||
R"JSON({
|
||||
"type":"ledgerClosed",
|
||||
"ledger_index":31,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"fee_base":0,
|
||||
"reserve_base":10,
|
||||
"reserve_inc":0,
|
||||
"validated_ledgers":"10-31",
|
||||
"txn_count":8
|
||||
"type": "ledgerClosed",
|
||||
"ledger_index": 31,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"fee_base": 0,
|
||||
"reserve_base": 10,
|
||||
"reserve_inc": 0,
|
||||
"validated_ledgers": "10-31",
|
||||
"txn_count": 8
|
||||
})JSON";
|
||||
|
||||
// test publish
|
||||
@@ -108,13 +108,13 @@ TEST_F(FeedLedgerTest, AutoDisconnect)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).WillOnce(testing::Return(feeBlob));
|
||||
static constexpr auto kLEDGER_RESPONSE =
|
||||
R"JSON({
|
||||
"validated_ledgers":"10-30",
|
||||
"ledger_index":30,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"fee_base":1,
|
||||
"reserve_base":3,
|
||||
"reserve_inc":2
|
||||
"validated_ledgers": "10-30",
|
||||
"ledger_index": 30,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"fee_base": 1,
|
||||
"reserve_base": 3,
|
||||
"reserve_inc": 2
|
||||
})JSON";
|
||||
|
||||
web::SubscriptionContextInterface::OnDisconnectSlot slot;
|
||||
|
||||
@@ -43,16 +43,16 @@ constexpr auto kDUMMY_TRANSACTION =
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rh1HPuRVsYYvThxG2Bs1MfjmrVC73S16Fb",
|
||||
"Amount":"40000000",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"20",
|
||||
"Flags":2147483648,
|
||||
"Sequence":13767283,
|
||||
"SigningPubKey":"036F3CFFE1EA77C1EEC5DCCA38C83E62E3AC068F8A16369620AF1D609BA5A620B2",
|
||||
"TransactionType":"Payment",
|
||||
"TxnSignature":"30450221009BD0D563B24E50B26A42F30455AD21C3D5CD4D80174C41F7B54969FFC08DE94C02201FC35320B56D56D1E34D1D281D48AC68CBEDDD6EE9DFA639CCB08BB251453A87",
|
||||
"hash":"F44393295DB860C6860769C16F5B23887762F09F87A8D1174E0FCFF9E7247F07"
|
||||
"Account": "rh1HPuRVsYYvThxG2Bs1MfjmrVC73S16Fb",
|
||||
"Amount": "40000000",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "20",
|
||||
"Flags": 2147483648,
|
||||
"Sequence": 13767283,
|
||||
"SigningPubKey": "036F3CFFE1EA77C1EEC5DCCA38C83E62E3AC068F8A16369620AF1D609BA5A620B2",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "30450221009BD0D563B24E50B26A42F30455AD21C3D5CD4D80174C41F7B54969FFC08DE94C02201FC35320B56D56D1E34D1D281D48AC68CBEDDD6EE9DFA639CCB08BB251453A87",
|
||||
"hash": "F44393295DB860C6860769C16F5B23887762F09F87A8D1174E0FCFF9E7247F07"
|
||||
}
|
||||
})JSON";
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace {
|
||||
constexpr auto kFEED = R"JSON({"test":"test"})JSON";
|
||||
constexpr auto kFEED = R"JSON({"test": "test"})JSON";
|
||||
} // namespace
|
||||
|
||||
using namespace feed::impl;
|
||||
|
||||
@@ -93,8 +93,8 @@ TEST_F(SubscriptionManagerAsyncTest, MultipleThreadCtx)
|
||||
EXPECT_CALL(*sessionPtr_, onDisconnect);
|
||||
subscriptionManagerPtr_->subValidation(session_);
|
||||
|
||||
static constexpr auto kJSON_MANIFEST = R"JSON({"manifest":"test"})JSON";
|
||||
static constexpr auto kJSON_VALIDATION = R"JSON({"validation":"test"})JSON";
|
||||
static constexpr auto kJSON_MANIFEST = R"JSON({"manifest": "test"})JSON";
|
||||
static constexpr auto kJSON_VALIDATION = R"JSON({"validation": "test"})JSON";
|
||||
|
||||
EXPECT_CALL(*sessionPtr_, send(testing::_)).Times(testing::AtMost(2));
|
||||
|
||||
@@ -112,23 +112,23 @@ TEST_F(SubscriptionManagerAsyncTest, MultipleThreadCtxSessionDieEarly)
|
||||
EXPECT_CALL(*sessionPtr_, send(testing::_)).Times(0);
|
||||
session_.reset();
|
||||
|
||||
subscriptionManagerPtr_->forwardManifest(json::parse(R"JSON({"manifest":"test"})JSON").get_object());
|
||||
subscriptionManagerPtr_->forwardValidation(json::parse(R"JSON({"validation":"test"})JSON").get_object());
|
||||
subscriptionManagerPtr_->forwardManifest(json::parse(R"JSON({"manifest": "test"})JSON").get_object());
|
||||
subscriptionManagerPtr_->forwardValidation(json::parse(R"JSON({"validation": "test"})JSON").get_object());
|
||||
}
|
||||
|
||||
TEST_F(SubscriptionManagerTest, ReportCurrentSubscriber)
|
||||
{
|
||||
static constexpr auto kREPORT_RETURN =
|
||||
R"JSON({
|
||||
"ledger":0,
|
||||
"transactions":2,
|
||||
"transactions_proposed":2,
|
||||
"manifests":2,
|
||||
"validations":2,
|
||||
"account":2,
|
||||
"accounts_proposed":2,
|
||||
"books":2,
|
||||
"book_changes":2
|
||||
"ledger": 0,
|
||||
"transactions": 2,
|
||||
"transactions_proposed": 2,
|
||||
"manifests": 2,
|
||||
"validations": 2,
|
||||
"account": 2,
|
||||
"accounts_proposed": 2,
|
||||
"books": 2,
|
||||
"book_changes": 2
|
||||
})JSON";
|
||||
web::SubscriptionContextPtr const session1 = std::make_shared<MockSession>();
|
||||
MockSession* mockSession1 = dynamic_cast<MockSession*>(session1.get());
|
||||
@@ -201,7 +201,7 @@ TEST_F(SubscriptionManagerTest, ReportCurrentSubscriber)
|
||||
|
||||
TEST_F(SubscriptionManagerTest, ManifestTest)
|
||||
{
|
||||
static constexpr auto kDUMMY_MANIFEST = R"JSON({"manifest":"test"})JSON";
|
||||
static constexpr auto kDUMMY_MANIFEST = R"JSON({"manifest": "test"})JSON";
|
||||
EXPECT_CALL(*sessionPtr_, onDisconnect);
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kDUMMY_MANIFEST)));
|
||||
subscriptionManagerPtr_->subManifest(session_);
|
||||
@@ -214,7 +214,7 @@ TEST_F(SubscriptionManagerTest, ManifestTest)
|
||||
|
||||
TEST_F(SubscriptionManagerTest, ValidationTest)
|
||||
{
|
||||
static constexpr auto kDUMMY = R"JSON({"validation":"test"})JSON";
|
||||
static constexpr auto kDUMMY = R"JSON({"validation": "test"})JSON";
|
||||
EXPECT_CALL(*sessionPtr_, onDisconnect);
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kDUMMY)));
|
||||
subscriptionManagerPtr_->subValidation(session_);
|
||||
@@ -242,21 +242,21 @@ TEST_F(SubscriptionManagerTest, BookChangesTest)
|
||||
transactions.push_back(trans1);
|
||||
static constexpr auto kBOOK_CHANGE_PUBLISH =
|
||||
R"JSON({
|
||||
"type":"bookChanges",
|
||||
"ledger_index":32,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"type": "bookChanges",
|
||||
"ledger_index": 32,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"changes":
|
||||
[
|
||||
{
|
||||
"currency_a":"XRP_drops",
|
||||
"currency_b":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD/0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"volume_a":"2",
|
||||
"volume_b":"2",
|
||||
"high":"-1",
|
||||
"low":"-1",
|
||||
"open":"-1",
|
||||
"close":"-1"
|
||||
"currency_a": "XRP_drops",
|
||||
"currency_b": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD/0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"volume_a": "2",
|
||||
"volume_b": "2",
|
||||
"high": "-1",
|
||||
"low": "-1",
|
||||
"open": "-1",
|
||||
"close": "-1"
|
||||
}
|
||||
]
|
||||
})JSON";
|
||||
@@ -282,13 +282,13 @@ TEST_F(SubscriptionManagerTest, LedgerTest)
|
||||
// the type and txn_count fields
|
||||
static constexpr auto kLEDGER_RESPONSE =
|
||||
R"JSON({
|
||||
"validated_ledgers":"10-30",
|
||||
"ledger_index":30,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"fee_base":1,
|
||||
"reserve_base":3,
|
||||
"reserve_inc":2
|
||||
"validated_ledgers": "10-30",
|
||||
"ledger_index": 30,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"fee_base": 1,
|
||||
"reserve_base": 3,
|
||||
"reserve_inc": 2
|
||||
})JSON";
|
||||
boost::asio::io_context ctx;
|
||||
boost::asio::spawn(ctx, [this](boost::asio::yield_context yield) {
|
||||
@@ -306,15 +306,15 @@ TEST_F(SubscriptionManagerTest, LedgerTest)
|
||||
fee2.reserve = 10;
|
||||
static constexpr auto kLEDGER_PUB =
|
||||
R"JSON({
|
||||
"type":"ledgerClosed",
|
||||
"ledger_index":31,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time":0,
|
||||
"fee_base":0,
|
||||
"reserve_base":10,
|
||||
"reserve_inc":0,
|
||||
"validated_ledgers":"10-31",
|
||||
"txn_count":8
|
||||
"type": "ledgerClosed",
|
||||
"ledger_index": 31,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_time": 0,
|
||||
"fee_base": 0,
|
||||
"reserve_base": 10,
|
||||
"reserve_inc": 0,
|
||||
"validated_ledgers": "10-31",
|
||||
"txn_count": 8
|
||||
})JSON";
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kLEDGER_PUB)));
|
||||
subscriptionManagerPtr_->pubLedger(ledgerHeader2, fee2, "10-31", 8);
|
||||
@@ -349,16 +349,16 @@ TEST_F(SubscriptionManagerTest, TransactionTest)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -369,42 +369,42 @@ TEST_F(SubscriptionManagerTest, TransactionTest)
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"TakerGets":"3",
|
||||
"TakerGets": "3",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer",
|
||||
"LedgerEntryType": "Offer",
|
||||
"PreviousFields":
|
||||
{
|
||||
"TakerGets":"1",
|
||||
"TakerGets": "1",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"3"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kORDERBOOK_PUBLISH))).Times(3);
|
||||
EXPECT_CALL(*sessionPtr_, apiSubversion).Times(3).WillRepeatedly(testing::Return(1));
|
||||
@@ -431,24 +431,24 @@ TEST_F(SubscriptionManagerTest, ProposedTransactionTest)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun"
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun"
|
||||
}
|
||||
})JSON";
|
||||
static constexpr auto kORDERBOOK_PUBLISH =
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -459,42 +459,42 @@ TEST_F(SubscriptionManagerTest, ProposedTransactionTest)
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"TakerGets":"3",
|
||||
"TakerGets": "3",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer",
|
||||
"LedgerEntryType": "Offer",
|
||||
"PreviousFields":
|
||||
{
|
||||
"TakerGets":"1",
|
||||
"TakerGets": "1",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value":"3"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kDUMMY_TRANSACTION))).Times(2);
|
||||
EXPECT_CALL(*sessionPtr_, send(sharedStringJsonEq(kORDERBOOK_PUBLISH))).Times(2);
|
||||
|
||||
@@ -64,16 +64,16 @@ constexpr auto kTRAN_V1 =
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -84,10 +84,10 @@ constexpr auto kTRAN_V1 =
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance":"110"
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance": "110"
|
||||
},
|
||||
"LedgerEntryType":"AccountRoot"
|
||||
"LedgerEntryType": "AccountRoot"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -95,80 +95,80 @@ constexpr auto kTRAN_V1 =
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"Account":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance":"30"
|
||||
"Account": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance": "30"
|
||||
},
|
||||
"LedgerEntryType":"AccountRoot"
|
||||
"LedgerEntryType": "AccountRoot"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
constexpr auto kTRAN_V2 =
|
||||
R"JSON({
|
||||
"tx_json":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":
|
||||
[
|
||||
{
|
||||
"ModifiedNode":{
|
||||
"FinalFields":{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance":"110"
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Balance": "110"
|
||||
},
|
||||
"LedgerEntryType":"AccountRoot"
|
||||
"LedgerEntryType": "AccountRoot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode":{
|
||||
"FinalFields":{
|
||||
"Account":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance":"30"
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Balance": "30"
|
||||
},
|
||||
"LedgerEntryType":"AccountRoot"
|
||||
"LedgerEntryType": "AccountRoot"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
} // namespace
|
||||
@@ -370,16 +370,16 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -390,41 +390,41 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"TakerGets":"3",
|
||||
"TakerGets": "3",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer",
|
||||
"PreviousFields":{
|
||||
"TakerGets":"1",
|
||||
"LedgerEntryType": "Offer",
|
||||
"PreviousFields": {
|
||||
"TakerGets": "1",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"3"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
EXPECT_CALL(*mockSessionPtr, apiSubversion).WillOnce(testing::Return(1));
|
||||
@@ -437,19 +437,19 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
|
||||
static constexpr auto kORDERBOOK_CANCEL_PUBLISH =
|
||||
R"JSON({
|
||||
"transaction":{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"transaction": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":{
|
||||
"meta": {
|
||||
"AffectedNodes":
|
||||
[
|
||||
{
|
||||
@@ -457,31 +457,31 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"TakerGets":"3",
|
||||
"TakerPays":{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"TakerGets": "3",
|
||||
"TakerPays": {
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer"
|
||||
"LedgerEntryType": "Offer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
EXPECT_CALL(*mockSessionPtr, apiSubversion).WillOnce(testing::Return(1));
|
||||
@@ -493,16 +493,16 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount":"1",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Amount": "1",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -511,33 +511,33 @@ TEST_F(FeedTransactionTest, SubBookV1)
|
||||
{
|
||||
"CreatedNode":
|
||||
{
|
||||
"NewFields":{
|
||||
"TakerGets":"3",
|
||||
"NewFields": {
|
||||
"TakerGets": "3",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer"
|
||||
"LedgerEntryType": "Offer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
metaObj = createMetaDataForCreateOffer(kCURRENCY, kISSUER, 22, 3, 1);
|
||||
trans1.metadata = metaObj.getSerializer().peekData();
|
||||
@@ -574,14 +574,14 @@ TEST_F(FeedTransactionTest, SubBookV2)
|
||||
R"JSON({
|
||||
"tx_json":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"DeliverMax":"1",
|
||||
"Destination":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"TransactionType":"Payment",
|
||||
"date":0
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"DeliverMax": "1",
|
||||
"Destination": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TransactionType": "Payment",
|
||||
"date": 0
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
@@ -592,43 +592,43 @@ TEST_F(FeedTransactionTest, SubBookV2)
|
||||
{
|
||||
"FinalFields":
|
||||
{
|
||||
"TakerGets":"3",
|
||||
"TakerGets": "3",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"LedgerEntryType":"Offer",
|
||||
"LedgerEntryType": "Offer",
|
||||
"PreviousFields":
|
||||
{
|
||||
"TakerGets":"1",
|
||||
"TakerGets": "1",
|
||||
"TakerPays":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"3"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS",
|
||||
"delivered_amount":"unavailable"
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "unavailable"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"hash":"51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"hash": "51D2AAA6B8E4E16EF22F6424854283D8391B56875858A711B8CE4D5B9A422CC2",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
EXPECT_CALL(*mockSessionPtr, apiSubversion).WillOnce(testing::Return(2));
|
||||
@@ -844,38 +844,38 @@ TEST_F(FeedTransactionTest, PubTransactionWithOwnerFund)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
},
|
||||
"TakerPays":"3",
|
||||
"TransactionType":"OfferCreate",
|
||||
"hash":"EE8775B43A67F4803DECEC5E918E0EA9C56D8ED93E512EBE9F2891846509AAAB",
|
||||
"date":0,
|
||||
"owner_funds":"100"
|
||||
"TakerPays": "3",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "EE8775B43A67F4803DECEC5E918E0EA9C56D8ED93E512EBE9F2891846509AAAB",
|
||||
"date": 0,
|
||||
"owner_funds": "100"
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":[],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS"
|
||||
"AffectedNodes": [],
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result":"tesSUCCESS",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result": "tesSUCCESS",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
EXPECT_CALL(*mockSessionPtr, apiSubversion).WillOnce(testing::Return(1));
|
||||
@@ -890,37 +890,37 @@ static constexpr auto kTRAN_FROZEN =
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"currency":"0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer":"rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value":"1"
|
||||
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
|
||||
"issuer": "rK9DrarGKnVEo2nYp5MfVRXRYf5yRX3mwD",
|
||||
"value": "1"
|
||||
},
|
||||
"TakerPays":"3",
|
||||
"TransactionType":"OfferCreate",
|
||||
"hash":"EE8775B43A67F4803DECEC5E918E0EA9C56D8ED93E512EBE9F2891846509AAAB",
|
||||
"date":0,
|
||||
"owner_funds":"0"
|
||||
"TakerPays": "3",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "EE8775B43A67F4803DECEC5E918E0EA9C56D8ED93E512EBE9F2891846509AAAB",
|
||||
"date": 0,
|
||||
"owner_funds": "0"
|
||||
},
|
||||
"meta":{
|
||||
"AffectedNodes":[],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS"
|
||||
"meta": {
|
||||
"AffectedNodes": [],
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"engine_result":"tesSUCCESS",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"engine_result": "tesSUCCESS",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
TEST_F(FeedTransactionTest, PubTransactionOfferCreationFrozenLine)
|
||||
@@ -1150,38 +1150,38 @@ TEST_F(FeedTransactionTest, PubTransactionWithOwnerFundFrozenLPToken)
|
||||
R"JSON({
|
||||
"transaction":
|
||||
{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee":"1",
|
||||
"Sequence":32,
|
||||
"SigningPubKey":"74657374",
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "1",
|
||||
"Sequence": 32,
|
||||
"SigningPubKey": "74657374",
|
||||
"TakerGets":
|
||||
{
|
||||
"currency":"037C35306B24AAB7FF90848206E003279AA47090",
|
||||
"issuer":"rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs",
|
||||
"value":"1"
|
||||
"currency": "037C35306B24AAB7FF90848206E003279AA47090",
|
||||
"issuer": "rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs",
|
||||
"value": "1"
|
||||
},
|
||||
"TakerPays":"3",
|
||||
"TransactionType":"OfferCreate",
|
||||
"hash":"9CA8BBF209DC4505F593A1EA0DC2135A5FA2C6541AF19D128B046873E0CEB695",
|
||||
"date":0,
|
||||
"owner_funds":"0"
|
||||
"TakerPays": "3",
|
||||
"TransactionType": "OfferCreate",
|
||||
"hash": "9CA8BBF209DC4505F593A1EA0DC2135A5FA2C6541AF19D128B046873E0CEB695",
|
||||
"date": 0,
|
||||
"owner_funds": "0"
|
||||
},
|
||||
"meta":
|
||||
{
|
||||
"AffectedNodes":[],
|
||||
"TransactionIndex":22,
|
||||
"TransactionResult":"tesSUCCESS"
|
||||
"AffectedNodes": [],
|
||||
"TransactionIndex": 22,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"ctid":"C000002100160000",
|
||||
"type":"transaction",
|
||||
"validated":true,
|
||||
"status":"closed",
|
||||
"ledger_index":33,
|
||||
"ledger_hash":"1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code":0,
|
||||
"ctid": "C000002100160000",
|
||||
"type": "transaction",
|
||||
"validated": true,
|
||||
"status": "closed",
|
||||
"ledger_index": 33,
|
||||
"ledger_hash": "1B8590C01B0006EDFA9ED60296DD052DC5E90F99659B25014D08E1BC983515BC",
|
||||
"engine_result_code": 0,
|
||||
"close_time_iso": "2000-01-01T00:00:00Z",
|
||||
"engine_result":"tesSUCCESS",
|
||||
"engine_result_message":"The transaction was applied. Only final in a validated ledger."
|
||||
"engine_result": "tesSUCCESS",
|
||||
"engine_result_message": "The transaction was applied. Only final in a validated ledger."
|
||||
})JSON";
|
||||
|
||||
EXPECT_CALL(*mockSessionPtr, apiSubversion).WillOnce(testing::Return(1));
|
||||
|
||||
Reference in New Issue
Block a user