Duplicate signer_lists in account_info (#870)

Fix #871
This commit is contained in:
cyan317
2023-09-25 13:24:16 +01:00
committed by GitHub
parent 44527140f0
commit e36545058d
3 changed files with 61 additions and 24 deletions

View File

@@ -289,7 +289,8 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
{
auto const expectedOutput = fmt::format(
R"({{
"account_data": {{
"account_data":
{{
"Account": "{}",
"Balance": "200",
"Flags": 0,
@@ -299,9 +300,8 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
"PreviousTxnLgrSeq": 2,
"Sequence": 2,
"TransferRate": 0,
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
}},
"signer_lists":
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"signer_lists":
[
{{
"Flags": 0,
@@ -330,8 +330,40 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
"SignerQuorum": 2,
"index": "A9C28A28B85CD533217F5C0A0C7767666B093FA58A0F2D80026FCC4CD932DDC7"
}}
],
"account_flags": {{
]
}},
"signer_lists":
[
{{
"Flags": 0,
"LedgerEntryType": "SignerList",
"OwnerNode": "0",
"PreviousTxnID": "0000000000000000000000000000000000000000000000000000000000000000",
"PreviousTxnLgrSeq": 0,
"SignerEntries":
[
{{
"SignerEntry":
{{
"Account": "{}",
"SignerWeight": 1
}}
}},
{{
"SignerEntry":
{{
"Account": "{}",
"SignerWeight": 1
}}
}}
],
"SignerListID": 0,
"SignerQuorum": 2,
"index": "A9C28A28B85CD533217F5C0A0C7767666B093FA58A0F2D80026FCC4CD932DDC7"
}}
],
"account_flags":
{{
"defaultRipple": false,
"depositAuth": false,
"disableMasterKey": false,
@@ -350,6 +382,8 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
INDEX1,
ACCOUNT1,
ACCOUNT2,
ACCOUNT1,
ACCOUNT2,
LEDGERHASH);
auto const rawBackendPtr = static_cast<MockBackend*>(mockBackendPtr.get());
mockBackendPtr->updateRange(10); // min