mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
refactor: Decouple app/tx from Application and Config (#6227)
This change decouples app/tx from `Application` and `Config` to clear the way to moving transactors to `libxrpl`.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/Env.h>
|
||||
|
||||
#include <xrpl/core/NetworkIDService.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
|
||||
namespace xrpl {
|
||||
@@ -58,7 +59,7 @@ public:
|
||||
// test mainnet
|
||||
{
|
||||
test::jtx::Env env{*this, makeNetworkConfig(0)};
|
||||
BEAST_EXPECT(env.app().config().NETWORK_ID == 0);
|
||||
BEAST_EXPECT(env.app().getNetworkIDService().getNetworkID() == 0);
|
||||
|
||||
// try to submit a txn without network id, this should work
|
||||
Json::Value jv;
|
||||
@@ -81,7 +82,7 @@ public:
|
||||
// NetworkID
|
||||
{
|
||||
test::jtx::Env env{*this, makeNetworkConfig(1024)};
|
||||
BEAST_EXPECT(env.app().config().NETWORK_ID == 1024);
|
||||
BEAST_EXPECT(env.app().getNetworkIDService().getNetworkID() == 1024);
|
||||
|
||||
// try to submit a txn without network id, this should work
|
||||
Json::Value jv;
|
||||
@@ -101,7 +102,7 @@ public:
|
||||
// absent networkid
|
||||
{
|
||||
test::jtx::Env env{*this, makeNetworkConfig(1025)};
|
||||
BEAST_EXPECT(env.app().config().NETWORK_ID == 1025);
|
||||
BEAST_EXPECT(env.app().getNetworkIDService().getNetworkID() == 1025);
|
||||
{
|
||||
env.fund(XRP(200), alice);
|
||||
// try to submit a txn without network id, this should not work
|
||||
|
||||
Reference in New Issue
Block a user