-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: simulate
RPC to dry-run a tx (XLS-69d)
#5069
base: develop
Are you sure you want to change the base?
Changes from all commits
7520ed4
d151a20
4ab69aa
360ed6a
628e1e3
0149c65
f555b73
51cf3c6
04e76d2
eb691dc
26f3bb6
3b4b354
5c383a9
b6bf4c5
d703935
4489fae
449b2c6
fa246bb
3fadb8d
08b65d0
e217dc1
d824daf
cc011c0
db7ad89
b30b3b9
f222f44
a3c0bb4
6c6ecc4
c8f3862
03cae0d
4aa5a3f
a0c472f
b3ec935
d712dc9
834965b
96599a2
22fdaf7
c977d97
4c1f93f
270fd02
a3510c4
588ed7f
edfb185
856c9fa
01e5683
c94c137
45088d0
fcea237
6108fd9
abed90c
64378d5
7f947d1
ea59f60
92bd751
8357e89
6ff73ea
ba499a9
acaffb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2160,6 +2160,31 @@ class JSONRPC_test : public beast::unit_test::suite | |
BEAST_EXPECT(RPC::contains_error(result)); | ||
BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee)); | ||
} | ||
|
||
{ | ||
// transaction with a higher base fee | ||
Json::Value req; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bit unclear, maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
test::jtx::Account const alice("alice"); | ||
Json::Reader().parse( | ||
"{ \"tx_json\" : { \"TransactionType\": \"AccountDelete\", " | ||
"\"Account\": \"" + | ||
env.master.human() + "\", \"Destination\": \"" + | ||
alice.human() + "\" } } ", | ||
req); | ||
Json::Value result = checkFee( | ||
req, | ||
Role::ADMIN, | ||
true, | ||
env.app().config(), | ||
feeTrack, | ||
env.app().getTxQ(), | ||
env.app()); | ||
|
||
BEAST_EXPECT(!RPC::contains_error(result)); | ||
BEAST_EXPECT( | ||
req[jss::tx_json].isMember(jss::Fee) && | ||
req[jss::tx_json][jss::Fee] == 50000000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How this magic number was calculated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is the default owner reserve There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So use it, it can be obtained through |
||
} | ||
} | ||
|
||
void | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this document and changes are outdated, please re-base to the latest develop version and make any changes if need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed