Remove deprecated fields (#814)

Fix #801
This commit is contained in:
cyan317
2023-08-07 18:23:13 +01:00
committed by GitHub
parent d61d702ccd
commit e3ada6c5da
4 changed files with 0 additions and 18 deletions

View File

@@ -39,14 +39,12 @@ LedgerHandler::process(LedgerHandler::Input input, Context const& ctx) const
}
else
{
output.header[JS(accepted)] = true;
output.header[JS(account_hash)] = ripple::strHex(lgrInfo.accountHash);
output.header[JS(close_flags)] = lgrInfo.closeFlags;
output.header[JS(close_time)] = lgrInfo.closeTime.time_since_epoch().count();
output.header[JS(close_time_human)] = ripple::to_string(lgrInfo.closeTime);
output.header[JS(close_time_resolution)] = lgrInfo.closeTimeResolution.count();
output.header[JS(closed)] = true;
output.header[JS(hash)] = ripple::strHex(lgrInfo.hash);
output.header[JS(ledger_hash)] = ripple::strHex(lgrInfo.hash);
output.header[JS(ledger_index)] = std::to_string(lgrInfo.seq);
output.header[JS(parent_close_time)] = lgrInfo.parentCloseTime.time_since_epoch().count();

View File

@@ -82,13 +82,11 @@ LedgerDataHandler::process(Input input, Context const& ctx) const
}
else
{
header[JS(accepted)] = true;
header[JS(account_hash)] = ripple::strHex(lgrInfo.accountHash);
header[JS(close_flags)] = lgrInfo.closeFlags;
header[JS(close_time)] = lgrInfo.closeTime.time_since_epoch().count();
header[JS(close_time_human)] = ripple::to_string(lgrInfo.closeTime);
header[JS(close_time_resolution)] = lgrInfo.closeTimeResolution.count();
header[JS(hash)] = ripple::strHex(lgrInfo.hash);
header[JS(ledger_hash)] = ripple::strHex(lgrInfo.hash);
header[JS(ledger_index)] = std::to_string(lgrInfo.seq);
header[JS(parent_close_time)] = lgrInfo.parentCloseTime.time_since_epoch().count();

View File

@@ -221,12 +221,10 @@ TEST_F(RPCLedgerDataHandlerTest, MarkerNotExist)
TEST_F(RPCLedgerDataHandlerTest, NoMarker)
{
static auto const ledgerExpected = R"({
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,
@@ -287,12 +285,10 @@ TEST_F(RPCLedgerDataHandlerTest, NoMarker)
TEST_F(RPCLedgerDataHandlerTest, TypeFilter)
{
static auto const ledgerExpected = R"({
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,
@@ -356,12 +352,10 @@ TEST_F(RPCLedgerDataHandlerTest, TypeFilter)
TEST_F(RPCLedgerDataHandlerTest, OutOfOrder)
{
static auto const ledgerExpected = R"({
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,

View File

@@ -256,13 +256,11 @@ TEST_F(RPCLedgerHandlerTest, Default)
"ledger_index":30,
"validated":true,
"ledger":{
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"closed":true,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,
@@ -444,13 +442,11 @@ TEST_F(RPCLedgerHandlerTest, TransactionsExpandNotBinary)
"ledger_index":30,
"validated":true,
"ledger":{
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"closed":true,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,
@@ -664,13 +660,11 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsEmtpy)
"ledger_index":30,
"validated":true,
"ledger":{
"accepted":true,
"account_hash":"0000000000000000000000000000000000000000000000000000000000000000",
"close_flags":0,
"close_time":0,
"close_time_resolution":0,
"closed":true,
"hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":"30",
"parent_close_time":0,
@@ -754,13 +748,11 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsTrueBinaryFalse)
static auto constexpr expectedOut =
R"({
"ledger": {
"accepted": true,
"account_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"close_flags": 0,
"close_time": 0,
"close_time_resolution": 0,
"closed": true,
"hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index": "30",
"parent_close_time": 0,