20 #include <ripple/app/misc/LoadFeeTrack.h>
21 #include <ripple/app/misc/TxQ.h>
22 #include <ripple/basics/contract.h>
23 #include <ripple/beast/unit_test.h>
24 #include <ripple/core/ConfigSections.h>
25 #include <ripple/json/json_reader.h>
26 #include <ripple/protocol/ErrorCodes.h>
27 #include <ripple/protocol/Feature.h>
28 #include <ripple/rpc/impl/TransactionSign.h>
30 #include <test/jtx/envconfig.h>
53 char const* description_,
72 {
"Minimal payment, no Amount only DeliverMax",
75 "command": "doesnt_matter",
76 "secret": "masterpassphrase",
78 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
79 "DeliverMax": "1000000000",
80 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
81 "TransactionType": "Payment"
86 "Missing field 'account'.",
87 "Missing field 'tx_json.Sequence'."}}},
89 {
"Pass in Fee with minimal payment, both Amount and DeliverMax.",
92 "command": "doesnt_matter",
93 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
94 "secret": "masterpassphrase",
97 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
98 "Amount": "1000000000",
99 "DeliverMax": "1000000000",
100 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
101 "TransactionType": "Payment"
106 "Missing field 'tx_json.Sequence'.",
107 "Missing field 'tx_json.Sequence'."}}},
109 {
"Pass in Sequence, no Amount only DeliverMax",
112 "command": "doesnt_matter",
113 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
114 "secret": "masterpassphrase",
117 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
118 "DeliverMax": "1000000000",
119 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
120 "TransactionType": "Payment"
125 "Missing field 'tx_json.Fee'.",
126 "Missing field 'tx_json.SigningPubKey'."}}},
128 {
"Pass in Sequence and Fee with minimal payment, both Amount and "
132 "command": "doesnt_matter",
133 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
134 "secret": "masterpassphrase",
138 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
139 "Amount": "1000000000",
140 "DeliverMax": "1000000000",
141 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
142 "TransactionType": "Payment"
147 "A Signer may not be the transaction's Account "
148 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
149 "Missing field 'tx_json.SigningPubKey'."}}},
151 {
"Add 'fee_mult_max' field.",
154 "command": "doesnt_matter",
155 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
156 "secret": "masterpassphrase",
160 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
161 "Amount": "1000000000",
162 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
163 "TransactionType": "Payment"
168 "Missing field 'tx_json.Fee'.",
169 "Missing field 'tx_json.SigningPubKey'."}}},
171 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
174 "command": "doesnt_matter",
175 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
176 "secret": "masterpassphrase",
181 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
182 "Amount": "1000000000",
183 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
184 "TransactionType": "Payment"
189 "Missing field 'tx_json.Fee'.",
190 "Missing field 'tx_json.SigningPubKey'."}}},
192 {
"fee_mult_max is ignored if 'Fee' is present.",
195 "command": "doesnt_matter",
196 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
197 "secret": "masterpassphrase",
202 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
203 "Amount": "1000000000",
204 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
205 "TransactionType": "Payment"
210 "A Signer may not be the transaction's Account "
211 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
212 "Missing field 'tx_json.SigningPubKey'."}}},
214 {
"fee_div_max is ignored if 'Fee' is present.",
217 "command": "doesnt_matter",
218 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
219 "secret": "masterpassphrase",
225 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
226 "Amount": "1000000000",
227 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
228 "TransactionType": "Payment"
233 "A Signer may not be the transaction's Account "
234 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
235 "Missing field 'tx_json.SigningPubKey'."}}},
237 {
"Invalid 'fee_mult_max' field.",
240 "command": "doesnt_matter",
241 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
242 "secret": "masterpassphrase",
243 "fee_mult_max": "NotAFeeMultiplier",
246 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
247 "Amount": "1000000000",
248 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
249 "TransactionType": "Payment"
252 {{"Invalid field 'fee_mult_max', not a positive integer.",
253 "Invalid field 'fee_mult_max', not a positive integer.",
254 "Missing field 'tx_json.Fee'.",
255 "Missing field 'tx_json.SigningPubKey'."}}},
257 {
"Invalid 'fee_div_max' field.",
260 "command": "doesnt_matter",
261 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
262 "secret": "masterpassphrase",
264 "fee_div_max": "NotAFeeMultiplier",
267 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
268 "Amount": "1000000000",
269 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
270 "TransactionType": "Payment"
273 {{"Invalid field 'fee_div_max', not a positive integer.",
274 "Invalid field 'fee_div_max', not a positive integer.",
275 "Missing field 'tx_json.Fee'.",
276 "Missing field 'tx_json.SigningPubKey'."}}},
278 {
"Invalid value for 'fee_mult_max' field.",
281 "command": "doesnt_matter",
282 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
283 "secret": "masterpassphrase",
287 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
288 "Amount": "1000000000",
289 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
290 "TransactionType": "Payment"
293 {{"Fee of 10 exceeds the requested tx limit of 0",
294 "Fee of 10 exceeds the requested tx limit of 0",
295 "Missing field 'tx_json.Fee'.",
296 "Missing field 'tx_json.SigningPubKey'."}}},
298 {
"Invalid value for 'fee_div_max' field.",
301 "command": "doesnt_matter",
302 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
303 "secret": "masterpassphrase",
308 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
309 "Amount": "1000000000",
310 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
311 "TransactionType": "Payment"
314 {{"Fee of 10 exceeds the requested tx limit of 5",
315 "Fee of 10 exceeds the requested tx limit of 5",
316 "Missing field 'tx_json.Fee'.",
317 "Missing field 'tx_json.SigningPubKey'."}}},
319 {
"Invalid zero value for 'fee_div_max' field.",
322 "command": "doesnt_matter",
323 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
324 "secret": "masterpassphrase",
329 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
330 "Amount": "1000000000",
331 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
332 "TransactionType": "Payment"
335 {{"Invalid field 'fee_div_max', not a positive integer.",
336 "Invalid field 'fee_div_max', not a positive integer.",
337 "Missing field 'tx_json.Fee'.",
338 "Missing field 'tx_json.SigningPubKey'."}}},
340 {
"Missing 'Amount'.",
343 "command": "doesnt_matter",
344 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
345 "secret": "masterpassphrase",
347 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
348 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
349 "TransactionType": "Payment"
352 {{"Missing field 'tx_json.Amount'.",
353 "Missing field 'tx_json.Amount'.",
354 "Missing field 'tx_json.Sequence'.",
355 "Missing field 'tx_json.Sequence'."}}},
357 {
"Invalid 'Amount'.",
360 "command": "doesnt_matter",
361 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
362 "secret": "masterpassphrase",
364 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
365 "Amount": "NotAnAmount",
366 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
367 "TransactionType": "Payment"
370 {{"Invalid field 'tx_json.Amount'.",
371 "Invalid field 'tx_json.Amount'.",
372 "Missing field 'tx_json.Sequence'.",
373 "Missing field 'tx_json.Sequence'."}}},
375 {
"Missing 'Destination'.",
378 "command": "doesnt_matter",
379 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
380 "secret": "masterpassphrase",
382 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
383 "Amount": "1000000000",
384 "TransactionType": "Payment"
387 {{"Missing field 'tx_json.Destination'.",
388 "Missing field 'tx_json.Destination'.",
389 "Missing field 'tx_json.Sequence'.",
390 "Missing field 'tx_json.Sequence'."}}},
392 {
"Invalid 'Destination'.",
395 "command": "doesnt_matter",
396 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
397 "secret": "masterpassphrase",
399 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
400 "Amount": "1000000000",
401 "Destination": "NotADestination",
402 "TransactionType": "Payment"
405 {{"Invalid field 'tx_json.Destination'.",
406 "Invalid field 'tx_json.Destination'.",
407 "Missing field 'tx_json.Sequence'.",
408 "Missing field 'tx_json.Sequence'."}}},
410 {
"Cannot create XRP to XRP paths.",
413 "command": "doesnt_matter",
414 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
415 "secret": "masterpassphrase",
418 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
419 "Amount": "1000000000",
420 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
421 "TransactionType": "Payment"
424 {{"Cannot build XRP to XRP paths.",
425 "Cannot build XRP to XRP paths.",
426 "Missing field 'tx_json.Sequence'.",
427 "Missing field 'tx_json.Sequence'."}}},
429 {
"Successful 'build_path'.",
432 "command": "doesnt_matter",
433 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
434 "secret": "masterpassphrase",
437 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
441 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
443 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
444 "TransactionType": "Payment"
449 "Missing field 'tx_json.Sequence'.",
450 "Missing field 'tx_json.Sequence'."}}},
452 {
"Not valid to include both 'Paths' and 'build_path'.",
455 "command": "doesnt_matter",
456 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
457 "secret": "masterpassphrase",
460 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
464 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
466 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
468 "TransactionType": "Payment"
471 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
472 "Cannot specify both 'tx_json.Paths' and 'build_path'",
473 "Missing field 'tx_json.Sequence'.",
474 "Missing field 'tx_json.Sequence'."}}},
476 {
"Successful 'SendMax'.",
479 "command": "doesnt_matter",
480 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
481 "secret": "masterpassphrase",
484 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
488 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
493 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
495 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
496 "TransactionType": "Payment"
501 "Missing field 'tx_json.Sequence'.",
502 "Missing field 'tx_json.Sequence'."}}},
504 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
507 "command": "doesnt_matter",
508 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
509 "secret": "masterpassphrase",
512 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
516 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
519 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
520 "TransactionType": "Payment"
525 "Missing field 'tx_json.Sequence'.",
526 "Missing field 'tx_json.Sequence'."}}},
528 {
"'secret' must be present.",
531 "command": "doesnt_matter",
532 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
534 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
535 "Amount": "1000000000",
536 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
537 "TransactionType": "Payment"
540 {{"Missing field 'secret'.",
541 "Missing field 'secret'.",
542 "Missing field 'tx_json.Sequence'.",
543 "Missing field 'tx_json.Sequence'."}}},
545 {
"'secret' must be non-empty.",
548 "command": "doesnt_matter",
549 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
552 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
553 "Amount": "1000000000",
554 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
555 "TransactionType": "Payment"
558 {{"Invalid field 'secret'.",
559 "Invalid field 'secret'.",
560 "Missing field 'tx_json.Sequence'.",
561 "Missing field 'tx_json.Sequence'."}}},
563 {
"Use 'seed' instead of 'secret'.",
566 "command": "doesnt_matter",
567 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
568 "key_type": "ed25519",
569 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
571 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
572 "Amount": "1000000000",
573 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
574 "TransactionType": "Payment"
579 "Missing field 'tx_json.Sequence'.",
580 "Missing field 'tx_json.Sequence'."}}},
582 {
"Malformed 'seed'.",
585 "command": "doesnt_matter",
586 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
587 "key_type": "ed25519",
588 "seed": "not a seed",
590 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
591 "Amount": "1000000000",
592 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
593 "TransactionType": "Payment"
596 {{"Disallowed seed.",
598 "Missing field 'tx_json.Sequence'.",
599 "Missing field 'tx_json.Sequence'."}}},
601 {
"'tx_json' must be present.",
604 "command": "doesnt_matter",
605 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
606 "secret": "masterpassphrase",
608 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
609 "Amount": "1000000000",
610 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
611 "TransactionType": "Payment"
614 {{"Missing field 'tx_json'.",
615 "Missing field 'tx_json'.",
616 "Missing field 'tx_json'.",
617 "Missing field 'tx_json'."}}},
619 {
"'TransactionType' must be present.",
622 "command": "doesnt_matter",
623 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
624 "secret": "masterpassphrase",
626 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
627 "Amount": "1000000000",
628 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
631 {{"Missing field 'tx_json.TransactionType'.",
632 "Missing field 'tx_json.TransactionType'.",
633 "Missing field 'tx_json.Sequence'.",
634 "Missing field 'tx_json.Sequence'."}}},
636 {
"The 'TransactionType' must be a pre-established transaction type.",
639 "command": "doesnt_matter",
640 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
641 "secret": "masterpassphrase",
643 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
644 "Amount": "1000000000",
645 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
646 "TransactionType": "tt"
649 {{"Field 'tx_json.TransactionType' has invalid data.",
650 "Field 'tx_json.TransactionType' has invalid data.",
651 "Missing field 'tx_json.Sequence'.",
652 "Missing field 'tx_json.Sequence'."}}},
654 {
"The 'TransactionType' may be represented with an integer.",
657 "command": "doesnt_matter",
658 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
659 "secret": "masterpassphrase",
661 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
662 "Amount": "1000000000",
663 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
669 "Missing field 'tx_json.Sequence'.",
670 "Missing field 'tx_json.Sequence'."}}},
672 {
"'Account' must be present.",
675 "command": "doesnt_matter",
676 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
677 "secret": "masterpassphrase",
679 "Amount": "1000000000",
680 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
681 "TransactionType": "Payment"
684 {{"Missing field 'tx_json.Account'.",
685 "Missing field 'tx_json.Account'.",
686 "Missing field 'tx_json.Sequence'.",
687 "Missing field 'tx_json.Sequence'."}}},
689 {
"'Account' must be well formed.",
692 "command": "doesnt_matter",
693 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
694 "secret": "masterpassphrase",
696 "Account": "NotAnAccount",
697 "Amount": "1000000000",
698 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
699 "TransactionType": "Payment"
702 {{"Invalid field 'tx_json.Account'.",
703 "Invalid field 'tx_json.Account'.",
704 "Missing field 'tx_json.Sequence'.",
705 "Missing field 'tx_json.Sequence'."}}},
707 {
"The 'offline' tag may be added to the transaction.",
710 "command": "doesnt_matter",
711 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
712 "secret": "masterpassphrase",
715 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
716 "Amount": "1000000000",
717 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
718 "TransactionType": "Payment"
723 "Missing field 'tx_json.Sequence'.",
724 "Missing field 'tx_json.Sequence'."}}},
726 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
729 "command": "doesnt_matter",
730 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
731 "secret": "masterpassphrase",
735 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
736 "Amount": "1000000000",
737 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
738 "TransactionType": "Payment"
741 {{"Missing field 'tx_json.Sequence'.",
742 "Missing field 'tx_json.Sequence'.",
743 "Missing field 'tx_json.Sequence'.",
744 "Missing field 'tx_json.Sequence'."}}},
746 {
"If 'offline' is true then a 'Fee' field must be supplied.",
749 "command": "doesnt_matter",
750 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
751 "secret": "masterpassphrase",
755 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
756 "Amount": "1000000000",
757 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
758 "TransactionType": "Payment"
761 {{"Missing field 'tx_json.Fee'.",
762 "Missing field 'tx_json.Fee'.",
763 "Missing field 'tx_json.Fee'.",
764 "Missing field 'tx_json.SigningPubKey'."}}},
766 {
"Valid transaction if 'offline' is true.",
769 "command": "doesnt_matter",
770 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
771 "secret": "masterpassphrase",
776 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
777 "Amount": "1000000000",
778 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
779 "TransactionType": "Payment"
784 "A Signer may not be the transaction's Account "
785 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
786 "Missing field 'tx_json.SigningPubKey'."}}},
788 {
"'offline' and 'build_path' are mutually exclusive.",
791 "command": "doesnt_matter",
792 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
793 "secret": "masterpassphrase",
799 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
800 "Amount": "1000000000",
801 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
802 "TransactionType": "Payment"
805 {{"Field 'build_path' not allowed in this context.",
806 "Field 'build_path' not allowed in this context.",
807 "Field 'build_path' not allowed in this context.",
808 "Missing field 'tx_json.SigningPubKey'."}}},
810 {
"A 'Flags' field may be specified.",
813 "command": "doesnt_matter",
814 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
815 "secret": "masterpassphrase",
818 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
819 "Amount": "1000000000",
820 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
821 "TransactionType": "Payment"
826 "Missing field 'tx_json.Sequence'.",
827 "Missing field 'tx_json.Sequence'."}}},
829 {
"The 'Flags' field must be numeric.",
832 "command": "doesnt_matter",
833 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
834 "secret": "masterpassphrase",
836 "Flags": "NotGoodFlags",
837 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
838 "Amount": "1000000000",
839 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
840 "TransactionType": "Payment"
843 {{"Field 'tx_json.Flags' has invalid data.",
844 "Field 'tx_json.Flags' has invalid data.",
845 "Missing field 'tx_json.Sequence'.",
846 "Missing field 'tx_json.Sequence'."}}},
848 {
"It's okay to add a 'debug_signing' field.",
851 "command": "doesnt_matter",
852 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
853 "secret": "masterpassphrase",
856 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
857 "Amount": "1000000000",
858 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
859 "TransactionType": "Payment"
864 "Missing field 'tx_json.Sequence'.",
865 "Missing field 'tx_json.Sequence'."}}},
867 {
"Single-sign a multisigned transaction.",
870 "command": "doesnt_matter",
871 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
874 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
875 "Amount" : "1000000000",
876 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
882 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
883 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
884 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
888 "SigningPubKey" : "",
889 "TransactionType" : "Payment"
892 {{"Already multisigned.",
893 "Already multisigned.",
894 "Secret does not match account.",
897 {
"Minimal sign_for.",
900 "command": "doesnt_matter",
901 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
902 "secret": "masterpassphrase",
904 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
905 "Amount": "1000000000",
906 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
910 "TransactionType": "Payment"
913 {{"Secret does not match account.",
914 "Secret does not match account.",
916 "Missing field 'tx_json.Signers'."}}},
918 {
"Minimal offline sign_for.",
921 "command": "doesnt_matter",
922 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
923 "secret": "masterpassphrase",
926 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
927 "Amount": "1000000000",
928 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
932 "TransactionType": "Payment"
935 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
937 {
"Offline sign_for using 'seed' instead of 'secret'.",
940 "command": "doesnt_matter",
941 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
942 "key_type": "ed25519",
943 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
946 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
947 "Amount": "1000000000",
948 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
952 "TransactionType": "Payment"
955 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
957 {
"Malformed seed in sign_for.",
960 "command": "doesnt_matter",
961 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
962 "key_type": "ed25519",
963 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
966 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
967 "Amount": "1000000000",
968 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
972 "TransactionType": "Payment"
975 {{"Disallowed seed.",
978 "Missing field 'tx_json.Signers'."}}},
980 {
"Missing 'Account' in sign_for.",
983 "command": "doesnt_matter",
984 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
985 "secret": "masterpassphrase",
987 "Amount": "1000000000",
988 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
992 "TransactionType": "Payment"
995 {{"Missing field 'tx_json.Account'.",
996 "Missing field 'tx_json.Account'.",
997 "Missing field 'tx_json.Account'.",
998 "Missing field 'tx_json.Account'."}}},
1000 {
"Missing 'Amount' in sign_for.",
1003 "command": "doesnt_matter",
1004 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1005 "secret": "masterpassphrase",
1007 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1008 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1011 "SigningPubKey": "",
1012 "TransactionType": "Payment"
1015 {{"Missing field 'tx_json.Amount'.",
1016 "Missing field 'tx_json.Amount'.",
1017 "Missing field 'tx_json.Amount'.",
1018 "Missing field 'tx_json.Amount'."}}},
1020 {
"Missing 'Destination' in sign_for.",
1023 "command": "doesnt_matter",
1024 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1025 "secret": "masterpassphrase",
1027 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1028 "Amount": "1000000000",
1031 "SigningPubKey": "",
1032 "TransactionType": "Payment"
1035 {{"Missing field 'tx_json.Destination'.",
1036 "Missing field 'tx_json.Destination'.",
1037 "Missing field 'tx_json.Destination'.",
1038 "Missing field 'tx_json.Destination'."}}},
1040 {
"Missing 'Destination' in sign_for, use DeliverMax",
1043 "command": "doesnt_matter",
1044 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1045 "secret": "masterpassphrase",
1047 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1048 "DeliverMax": "1000000000",
1051 "SigningPubKey": "",
1052 "TransactionType": "Payment"
1055 {{"Missing field 'tx_json.Destination'.",
1056 "Missing field 'tx_json.Destination'.",
1057 "Missing field 'tx_json.Destination'.",
1058 "Missing field 'tx_json.Destination'."}}},
1060 {
"Missing 'Fee' in sign_for.",
1063 "command": "doesnt_matter",
1064 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1065 "secret": "masterpassphrase",
1067 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1068 "Amount": "1000000000",
1069 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1071 "SigningPubKey": "",
1072 "TransactionType": "Payment"
1075 {{"Secret does not match account.",
1076 "Secret does not match account.",
1077 "Missing field 'tx_json.Fee'.",
1078 "Missing field 'tx_json.Fee'."}}},
1080 {
"Missing 'Sequence' in sign_for.",
1083 "command": "doesnt_matter",
1084 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1085 "secret": "masterpassphrase",
1087 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1088 "Amount": "1000000000",
1089 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1091 "SigningPubKey": "",
1092 "TransactionType": "Payment"
1095 {{"Secret does not match account.",
1096 "Secret does not match account.",
1097 "Missing field 'tx_json.Sequence'.",
1098 "Missing field 'tx_json.Sequence'."}}},
1100 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1103 "command": "doesnt_matter",
1104 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1105 "secret": "masterpassphrase",
1107 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1108 "Amount": "1000000000",
1109 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1112 "TransactionType": "Payment"
1115 {{"Secret does not match account.",
1116 "Secret does not match account.",
1118 "Missing field 'tx_json.SigningPubKey'."}}},
1120 {
"In sign_for, an account may not sign for itself.",
1123 "command": "doesnt_matter",
1124 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1127 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1128 "Amount": "1000000000",
1129 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1132 "TransactionType": "Payment"
1137 "A Signer may not be the transaction's Account "
1138 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1139 "Missing field 'tx_json.SigningPubKey'."}}},
1141 {
"Cannot put duplicate accounts in Signers array",
1144 "command": "doesnt_matter",
1145 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1146 "secret": "masterpassphrase",
1148 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1149 "Amount" : "1000000000",
1150 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1156 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1157 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1158 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1162 "SigningPubKey" : "",
1163 "TransactionType" : "Payment"
1166 {{"Already multisigned.",
1167 "Already multisigned.",
1168 "Duplicate Signers:Signer:Account entries "
1169 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1172 {
"Correctly append to pre-established Signers array",
1175 "command": "doesnt_matter",
1176 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1179 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1180 "Amount" : "1000000000",
1181 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1187 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1188 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1189 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1193 "SigningPubKey" : "",
1194 "TransactionType" : "Payment"
1197 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1199 {
"Append to pre-established Signers array with bad signature",
1202 "command": "doesnt_matter",
1203 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1206 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1207 "Amount" : "1000000000",
1208 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1214 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1215 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1216 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1220 "SigningPubKey" : "",
1221 "TransactionType" : "Payment"
1224 {{"Already multisigned.",
1225 "Already multisigned.",
1226 "Invalid signature.",
1227 "Invalid signature."}}},
1229 {
"Non-empty 'SigningPubKey' in sign_for.",
1232 "command": "doesnt_matter",
1233 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1234 "secret": "masterpassphrase",
1236 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1237 "Amount": "1000000000",
1238 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1241 "SigningPubKey": "1",
1242 "TransactionType": "Payment"
1245 {{"Secret does not match account.",
1246 "Secret does not match account.",
1247 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1248 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1250 {
"Missing 'TransactionType' in sign_for.",
1253 "command": "doesnt_matter",
1254 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1255 "secret": "masterpassphrase",
1257 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1258 "Amount": "1000000000",
1259 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1262 "SigningPubKey": "",
1265 {{"Missing field 'tx_json.TransactionType'.",
1266 "Missing field 'tx_json.TransactionType'.",
1267 "Missing field 'tx_json.TransactionType'.",
1268 "Missing field 'tx_json.TransactionType'."}}},
1270 {
"TxnSignature in sign_for.",
1273 "command": "doesnt_matter",
1274 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1277 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1278 "Amount" : "1000000000",
1279 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1285 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1286 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1287 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1291 "SigningPubKey" : "",
1292 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1293 "TransactionType" : "Payment"
1296 {{"Already multisigned.",
1297 "Already multisigned.",
1298 "Already single-signed.",
1299 "Signing of transaction is malformed."}}},
1301 {
"Invalid field 'tx_json': string instead of object",
1304 "command": "doesnt_matter",
1305 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1306 "secret": "masterpassphrase",
1309 {{"Invalid field 'tx_json', not object.",
1310 "Invalid field 'tx_json', not object.",
1311 "Invalid field 'tx_json', not object.",
1312 "Invalid field 'tx_json', not object."}}},
1314 {
"Invalid field 'tx_json': integer instead of object",
1317 "command": "doesnt_matter",
1318 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1319 "secret": "masterpassphrase",
1322 {{"Invalid field 'tx_json', not object.",
1323 "Invalid field 'tx_json', not object.",
1324 "Invalid field 'tx_json', not object.",
1325 "Invalid field 'tx_json', not object."}}},
1327 {
"Invalid field 'tx_json': array instead of object",
1330 "command": "doesnt_matter",
1331 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1332 "secret": "masterpassphrase",
1333 "tx_json": [ "hello", "world" ]
1335 {{"Invalid field 'tx_json', not object.",
1336 "Invalid field 'tx_json', not object.",
1337 "Invalid field 'tx_json', not object.",
1338 "Invalid field 'tx_json', not object."}}},
1340 {
"Minimal submit_multisigned.",
1343 "command": "submit_multisigned",
1345 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1346 "Amount": "1000000000",
1347 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1353 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1354 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1355 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1359 "SigningPubKey": "",
1360 "TransactionType": "Payment"
1363 {{"Missing field 'secret'.",
1364 "Missing field 'secret'.",
1365 "Missing field 'account'.",
1368 {
"Minimal submit_multisigned with bad signature.",
1371 "command": "submit_multisigned",
1373 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1374 "Amount": "1000000000",
1375 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1381 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1382 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1383 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1387 "SigningPubKey": "",
1388 "TransactionType": "Payment"
1391 {{"Missing field 'secret'.",
1392 "Missing field 'secret'.",
1393 "Missing field 'account'.",
1394 "Invalid signature."}}},
1396 {
"Missing tx_json in submit_multisigned.",
1399 "command": "submit_multisigned",
1403 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1404 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1405 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1410 {{"Missing field 'secret'.",
1411 "Missing field 'secret'.",
1412 "Missing field 'account'.",
1413 "Missing field 'tx_json'."}}},
1415 {
"Missing sequence in submit_multisigned.",
1418 "command": "submit_multisigned",
1420 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1421 "Amount": "1000000000",
1422 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1427 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1428 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1429 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1433 "SigningPubKey": "",
1434 "TransactionType": "Payment"
1437 {{"Missing field 'secret'.",
1438 "Missing field 'secret'.",
1439 "Missing field 'account'.",
1440 "Missing field 'tx_json.Sequence'."}}},
1442 {
"Missing SigningPubKey in submit_multisigned.",
1445 "command": "submit_multisigned",
1447 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1448 "Amount": "1000000000",
1449 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1454 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1455 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1456 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1461 "TransactionType": "Payment"
1464 {{"Missing field 'secret'.",
1465 "Missing field 'secret'.",
1466 "Missing field 'account'.",
1467 "Missing field 'tx_json.SigningPubKey'."}}},
1469 {
"Non-empty SigningPubKey in submit_multisigned.",
1472 "command": "submit_multisigned",
1474 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1475 "Amount": "1000000000",
1476 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1482 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1483 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1484 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1488 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1489 "TransactionType": "Payment"
1492 {{"Missing field 'secret'.",
1493 "Missing field 'secret'.",
1494 "Missing field 'account'.",
1495 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1497 {
"Missing TransactionType in submit_multisigned.",
1500 "command": "submit_multisigned",
1502 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1503 "Amount": "1000000000",
1504 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1509 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1510 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1511 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1516 "SigningPubKey": "",
1519 {{"Missing field 'secret'.",
1520 "Missing field 'secret'.",
1521 "Missing field 'account'.",
1522 "Missing field 'tx_json.TransactionType'."}}},
1524 {
"Missing Account in submit_multisigned.",
1527 "command": "submit_multisigned",
1529 "Amount": "1000000000",
1530 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1536 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1537 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1538 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1542 "SigningPubKey": "",
1543 "TransactionType": "Payment"
1546 {{"Missing field 'secret'.",
1547 "Missing field 'secret'.",
1548 "Missing field 'account'.",
1549 "Missing field 'tx_json.Account'."}}},
1551 {
"Malformed Account in submit_multisigned.",
1554 "command": "submit_multisigned",
1556 "Account": "NotAnAccount",
1557 "Amount": "1000000000",
1558 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1564 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1565 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1566 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1570 "SigningPubKey": "",
1571 "TransactionType": "Payment"
1574 {{"Missing field 'secret'.",
1575 "Missing field 'secret'.",
1576 "Missing field 'account'.",
1577 "Invalid field 'tx_json.Account'."}}},
1579 {
"Account not in ledger in submit_multisigned.",
1582 "command": "submit_multisigned",
1584 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1585 "Amount": "1000000000",
1586 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1592 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1593 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1594 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1598 "SigningPubKey": "",
1599 "TransactionType": "Payment"
1602 {{"Missing field 'secret'.",
1603 "Missing field 'secret'.",
1604 "Missing field 'account'.",
1605 "Source account not found."}}},
1607 {
"Missing Fee in submit_multisigned.",
1610 "command": "submit_multisigned",
1612 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1613 "Amount": "1000000000",
1614 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1619 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1620 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1621 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1625 "SigningPubKey": "",
1626 "TransactionType": "Payment"
1629 {{"Missing field 'secret'.",
1630 "Missing field 'secret'.",
1631 "Missing field 'account'.",
1632 "Missing field 'tx_json.Fee'."}}},
1634 {
"Non-numeric Fee in submit_multisigned.",
1637 "command": "submit_multisigned",
1639 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1640 "Amount": "1000000000",
1641 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1647 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1648 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1649 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1653 "SigningPubKey": "",
1654 "TransactionType": "Payment"
1657 {{"Missing field 'secret'.",
1658 "Missing field 'secret'.",
1659 "Missing field 'account'.",
1660 "Field 'tx_json.Fee' has invalid data."}}},
1662 {
"Missing Amount in submit_multisigned Payment.",
1665 "command": "submit_multisigned",
1667 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1668 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1674 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1675 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1676 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1680 "SigningPubKey": "",
1681 "TransactionType": "Payment"
1684 {{"Missing field 'secret'.",
1685 "Missing field 'secret'.",
1686 "Missing field 'account'.",
1687 "Missing field 'tx_json.Amount'."}}},
1689 {
"Invalid Amount in submit_multisigned Payment.",
1692 "command": "submit_multisigned",
1694 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1695 "Amount": "NotANumber",
1696 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1702 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1703 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1704 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1708 "SigningPubKey": "",
1709 "TransactionType": "Payment"
1712 {{"Missing field 'secret'.",
1713 "Missing field 'secret'.",
1714 "Missing field 'account'.",
1715 "Invalid field 'tx_json.Amount'."}}},
1717 {
"Invalid DeliverMax in submit_multisigned Payment.",
1720 "command": "submit_multisigned",
1722 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1723 "DeliverMax": "NotANumber",
1724 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1730 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1731 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1732 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1736 "SigningPubKey": "",
1737 "TransactionType": "Payment"
1740 {{"Missing field 'secret'.",
1741 "Missing field 'secret'.",
1742 "Missing field 'account'.",
1743 "Invalid field 'tx_json.Amount'."}}},
1745 {
"No build_path in submit_multisigned.",
1748 "command": "submit_multisigned",
1751 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1752 "Amount": "1000000000",
1753 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1759 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1760 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1761 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1765 "SigningPubKey": "",
1766 "TransactionType": "Payment"
1769 {{"Missing field 'secret'.",
1770 "Missing field 'secret'.",
1771 "Missing field 'account'.",
1772 "Field 'build_path' not allowed in this context."}}},
1774 {
"Missing Destination in submit_multisigned Payment.",
1777 "command": "submit_multisigned",
1779 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1780 "Amount": "1000000000",
1786 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1787 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1788 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1792 "SigningPubKey": "",
1793 "TransactionType": "Payment"
1796 {{"Missing field 'secret'.",
1797 "Missing field 'secret'.",
1798 "Missing field 'account'.",
1799 "Missing field 'tx_json.Destination'."}}},
1801 {
"Malformed Destination in submit_multisigned Payment.",
1804 "command": "submit_multisigned",
1806 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1807 "Amount": "1000000000",
1808 "Destination": "NotADestination",
1814 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1815 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1816 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1820 "SigningPubKey": "",
1821 "TransactionType": "Payment"
1824 {{"Missing field 'secret'.",
1825 "Missing field 'secret'.",
1826 "Missing field 'account'.",
1827 "Invalid field 'tx_json.Destination'."}}},
1829 {
"Missing Signers field in submit_multisigned.",
1832 "command": "submit_multisigned",
1834 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1835 "Amount": "1000000000",
1836 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1839 "SigningPubKey": "",
1840 "TransactionType": "Payment"
1843 {{"Missing field 'secret'.",
1844 "Missing field 'secret'.",
1845 "Missing field 'account'.",
1846 "Missing field 'tx_json.Signers'."}}},
1848 {
"Signers not an array in submit_multisigned.",
1851 "command": "submit_multisigned",
1853 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1854 "Amount": "1000000000",
1855 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1859 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1860 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1861 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1863 "SigningPubKey": "",
1864 "TransactionType": "Payment"
1867 {{"Missing field 'secret'.",
1868 "Missing field 'secret'.",
1869 "Missing field 'account'.",
1870 "Field 'tx_json.Signers' is not a JSON array."}}},
1872 {
"Empty Signers array in submit_multisigned.",
1875 "command": "submit_multisigned",
1877 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1878 "Amount": "1000000000",
1879 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1884 "SigningPubKey": "",
1885 "TransactionType": "Payment"
1888 {{"Missing field 'secret'.",
1889 "Missing field 'secret'.",
1890 "Missing field 'account'.",
1891 "tx_json.Signers array may not be empty."}}},
1893 {
"Duplicate Signer in submit_multisigned.",
1896 "command": "submit_multisigned",
1898 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1899 "Amount": "1000000000",
1900 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1906 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1907 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1908 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1913 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1914 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1915 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1919 "SigningPubKey": "",
1920 "TransactionType": "Payment"
1923 {{"Missing field 'secret'.",
1924 "Missing field 'secret'.",
1925 "Missing field 'account'.",
1926 "Duplicate Signers:Signer:Account entries "
1927 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1929 {
"Signer is tx_json Account in submit_multisigned.",
1932 "command": "submit_multisigned",
1934 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1935 "Amount": "1000000000",
1936 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1942 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1943 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1944 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1948 "SigningPubKey": "",
1949 "TransactionType": "Payment"
1952 {{"Missing field 'secret'.",
1953 "Missing field 'secret'.",
1954 "Missing field 'account'.",
1955 "A Signer may not be the transaction's Account "
1956 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1958 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1961 "command": "submit_multisigned",
1963 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1964 "DeliverMax": "10000000",
1965 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1970 "SigningPubKey": "",
1971 "TransactionType": "Payment"
1974 {{"Missing field 'secret'.",
1975 "Missing field 'secret'.",
1976 "Missing field 'account'.",
1977 "tx_json.Signers array may not be empty."}}},
1979 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1982 "command": "submit_multisigned",
1984 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1985 "Amount": "10000000",
1986 "DeliverMax": "10000000",
1987 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1992 "SigningPubKey": "",
1993 "TransactionType": "Payment"
1996 {{"Missing field 'secret'.",
1997 "Missing field 'secret'.",
1998 "Missing field 'account'.",
1999 "tx_json.Signers array may not be empty."}}},
2001 {
"Payment cannot specify different DeliverMax and Amount.",
2004 "command": "doesnt_matter",
2005 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2006 "secret": "masterpassphrase",
2009 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2010 "Amount": "1000000000",
2011 "DeliverMax": "1000000020",
2012 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2015 "SigningPubKey": "",
2016 "TransactionType": "Payment"
2019 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
2020 "Cannot specify differing 'Amount' and 'DeliverMax'",
2021 "Cannot specify differing 'Amount' and 'DeliverMax'",
2022 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
2034 env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2036 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2038 result[jss::result][jss::request][jss::command] ==
"bad_command");
2051 "{ \"fee_mult_max\" : 1, \"tx_json\" : { } } ", req);
2063 req[jss::tx_json].isMember(jss::Fee) &&
2064 req[jss::tx_json][jss::Fee] == 10);
2070 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2071 "\"tx_json\" : { } } ",
2084 req[jss::tx_json].isMember(jss::Fee) &&
2085 req[jss::tx_json][jss::Fee] == 10);
2091 "{ \"fee_mult_max\" : 0, \"tx_json\" : { } } ", req);
2102 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2110 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2111 "\"tx_json\" : { } } ",
2123 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2129 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2130 "\"tx_json\" : { } } ",
2142 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2148 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2149 "\"tx_json\" : { } } ",
2161 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2168 using namespace test::jtx;
2170 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2171 cfg->section(
"transaction_queue")
2172 .
set(
"minimum_txn_in_ledger_standalone",
"3");
2175 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2182 "fee_mult_max" : 1000,
2197 req[jss::tx_json].isMember(jss::Fee) &&
2198 req[jss::tx_json][jss::Fee] == 10);
2221 req[jss::tx_json].isMember(jss::Fee) &&
2222 req[jss::tx_json][jss::Fee] == 10);
2226 for (
auto i = 0; i < 4; ++i)
2228 env(noop(env.master));
2236 "fee_mult_max" : 1000,
2251 req[jss::tx_json].isMember(jss::Fee) &&
2252 req[jss::tx_json][jss::Fee] == 8889);
2274 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2282 "fee_mult_max" : 1000,
2297 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2305 "fee_mult_max" : 8000,
2321 req[jss::tx_json].isMember(jss::Fee) &&
2322 req[jss::tx_json][jss::Fee] == 8889);
2330 "fee_mult_max" : -5,
2372 "fee_mult_max" : -2,
2394 toSign[jss::tx_json] = noop(env.master);
2395 toSign[jss::secret] =
"masterpassphrase";
2396 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2397 auto result = rpcResult[jss::result];
2401 result[jss::tx_json].isMember(jss::Fee) &&
2402 result[jss::tx_json][jss::Fee] ==
"10");
2404 result[jss::tx_json].isMember(jss::Sequence) &&
2405 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2406 Json::ValueType::uintValue));
2414 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2415 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2417 env(noop(env.master));
2421 toSign[jss::tx_json] = noop(env.master);
2422 toSign[jss::secret] =
"masterpassphrase";
2423 toSign[jss::fee_mult_max] = 900;
2424 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2425 auto result = rpcResult[jss::result];
2429 result[jss::tx_json].isMember(jss::Fee) &&
2430 result[jss::tx_json][jss::Fee] ==
"7813");
2432 result[jss::tx_json].isMember(jss::Sequence) &&
2433 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2434 Json::ValueType::uintValue));
2442 auto& feeTrack = env.app().getFeeTrack();
2443 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2444 for (
int i = 0; i < 8; ++i)
2445 feeTrack.raiseLocalFee();
2446 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2450 toSign[jss::tx_json] = noop(env.master);
2451 toSign[jss::secret] =
"masterpassphrase";
2452 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2453 auto result = rpcResult[jss::result];
2457 result[jss::tx_json].isMember(jss::Fee) &&
2458 result[jss::tx_json][jss::Fee] ==
"47");
2460 result[jss::tx_json].isMember(jss::Sequence) &&
2461 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2462 Json::ValueType::uintValue));
2472 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2473 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2475 env(noop(env.master), fee(47));
2481 toSign[jss::tx_json] = noop(env.master);
2482 toSign[jss::secret] =
"masterpassphrase";
2484 toSign[jss::fee_mult_max] = 700;
2485 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2486 auto result = rpcResult[jss::result];
2490 result[jss::tx_json].isMember(jss::Fee) &&
2491 result[jss::tx_json][jss::Fee] ==
"6806");
2493 result[jss::tx_json].isMember(jss::Sequence) &&
2494 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2495 Json::ValueType::uintValue));
2513 using namespace std::chrono_literals;
2515 test::jtx::Account
const a{
"a"};
2516 test::jtx::Account
const g{
"g"};
2517 auto const USD = g[
"USD"];
2526 test::jtx::Env env(*
this);
2530 env(
trust(a, USD(1000)));
2531 env(
trust(env.master, USD(1000)));
2532 env(
pay(g, a, USD(50)));
2533 env(
pay(g, env.master, USD(50)));
2541 unsigned int apiVersion,
2549 unsigned int apiVersion,
2559 static TestStuff
const testFuncs[] = {
2566 "submit_multisigned",
2569 for (
auto testFunc : testFuncs)
2577 Throw<std::runtime_error>(
2578 "Internal JSONRPC_test error. Bad test JSON.");
2580 static Role const testedRoles[] = {
2583 for (
Role testRole : testedRoles)
2586 auto const signFn = get<0>(testFunc);
2587 if (signFn !=
nullptr)
2589 assert(get<1>(testFunc) ==
nullptr);
2600 auto const submitFn = get<1>(testFunc);
2601 assert(submitFn !=
nullptr);
2614 errStr = result[
"error_message"].
asString();
2616 if (errStr == txnTest.expMsg[get<3>(testFunc)])
2623 description << txnTest.description <<
" Called "
2624 << get<2>(testFunc) <<
"(). Got \'"
2626 fail(description.
str(), __FILE__, txnTest.line);