mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
fix: issues in simulate RPC (#5265)
Make `simulate` RPC easier to use: * Prevent the use of `seed`, `secret`, `seed_hex`, and `passphrase` fields (to avoid confusing with the signing methods). * Add autofilling of the `NetworkID` field.
This commit is contained in:
@@ -493,9 +493,12 @@ Env::autofill(JTx& jt)
|
||||
if (jt.fill_seq)
|
||||
jtx::fill_seq(jv, *current());
|
||||
|
||||
uint32_t networkID = app().config().NETWORK_ID;
|
||||
if (!jv.isMember(jss::NetworkID) && networkID > 1024)
|
||||
jv[jss::NetworkID] = std::to_string(networkID);
|
||||
if (jt.fill_netid)
|
||||
{
|
||||
uint32_t networkID = app().config().NETWORK_ID;
|
||||
if (!jv.isMember(jss::NetworkID) && networkID > 1024)
|
||||
jv[jss::NetworkID] = std::to_string(networkID);
|
||||
}
|
||||
|
||||
// Must come last
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user