version2's account_info (#747)

Fixes #743
This commit is contained in:
cyan317
2023-07-10 13:42:09 +01:00
committed by GitHub
parent 73805d44ad
commit 7b306f3ba0
2 changed files with 6 additions and 6 deletions

View File

@@ -121,8 +121,8 @@ tag_invoke(boost::json::value_from_tag, boost::json::value& jv, AccountInfoHandl
std::cend(output.signerLists.value()), std::cend(output.signerLists.value()),
std::back_inserter(signers), std::back_inserter(signers),
[](auto const& signerList) { return toJson(signerList); }); [](auto const& signerList) { return toJson(signerList); });
// version 2 puts the signer_lists out of the account_data
jv.as_object()[JS(account_data)].as_object()[JS(signer_lists)] = std::move(signers); jv.as_object()[JS(signer_lists)] = std::move(signers);
} }
} }

View File

@@ -301,8 +301,9 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
"PreviousTxnLgrSeq":2, "PreviousTxnLgrSeq":2,
"Sequence":2, "Sequence":2,
"TransferRate":0, "TransferRate":0,
"index":"13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8", "index":"13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"
"signer_lists": }},
"signer_lists":
[ [
{{ {{
"Flags":0, "Flags":0,
@@ -331,8 +332,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrue)
"SignerQuorum":2, "SignerQuorum":2,
"index":"A9C28A28B85CD533217F5C0A0C7767666B093FA58A0F2D80026FCC4CD932DDC7" "index":"A9C28A28B85CD533217F5C0A0C7767666B093FA58A0F2D80026FCC4CD932DDC7"
}} }}
] ],
}},
"account_flags": {{ "account_flags": {{
"defaultRipple": false, "defaultRipple": false,
"depositAuth": false, "depositAuth": false,