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_,
75 "command": "doesnt_matter",
76 "secret": "masterpassphrase",
78 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
79 "Amount": "1000000000",
80 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
81 "TransactionType": "Payment"
86 "Missing field 'account'.",
87 "Missing field 'tx_json.Sequence'."}}},
89 {
"Pass in Fee with minimal payment.",
92 "command": "doesnt_matter",
93 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
94 "secret": "masterpassphrase",
97 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
98 "Amount": "1000000000",
99 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
100 "TransactionType": "Payment"
105 "Missing field 'tx_json.Sequence'.",
106 "Missing field 'tx_json.Sequence'."}}},
108 {
"Pass in Sequence.",
111 "command": "doesnt_matter",
112 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
113 "secret": "masterpassphrase",
116 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
117 "Amount": "1000000000",
118 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
119 "TransactionType": "Payment"
124 "Missing field 'tx_json.Fee'.",
125 "Missing field 'tx_json.SigningPubKey'."}}},
127 {
"Pass in Sequence and Fee with minimal payment.",
130 "command": "doesnt_matter",
131 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
132 "secret": "masterpassphrase",
136 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
137 "Amount": "1000000000",
138 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
139 "TransactionType": "Payment"
144 "A Signer may not be the transaction's Account "
145 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
146 "Missing field 'tx_json.SigningPubKey'."}}},
148 {
"Add 'fee_mult_max' field.",
151 "command": "doesnt_matter",
152 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
153 "secret": "masterpassphrase",
157 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
158 "Amount": "1000000000",
159 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
160 "TransactionType": "Payment"
165 "Missing field 'tx_json.Fee'.",
166 "Missing field 'tx_json.SigningPubKey'."}}},
168 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
171 "command": "doesnt_matter",
172 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
173 "secret": "masterpassphrase",
178 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
179 "Amount": "1000000000",
180 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
181 "TransactionType": "Payment"
186 "Missing field 'tx_json.Fee'.",
187 "Missing field 'tx_json.SigningPubKey'."}}},
189 {
"fee_mult_max is ignored if 'Fee' is present.",
192 "command": "doesnt_matter",
193 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
194 "secret": "masterpassphrase",
199 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
200 "Amount": "1000000000",
201 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
202 "TransactionType": "Payment"
207 "A Signer may not be the transaction's Account "
208 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
209 "Missing field 'tx_json.SigningPubKey'."}}},
211 {
"fee_div_max is ignored if 'Fee' is present.",
214 "command": "doesnt_matter",
215 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
216 "secret": "masterpassphrase",
222 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
223 "Amount": "1000000000",
224 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
225 "TransactionType": "Payment"
230 "A Signer may not be the transaction's Account "
231 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
232 "Missing field 'tx_json.SigningPubKey'."}}},
234 {
"Invalid 'fee_mult_max' field.",
237 "command": "doesnt_matter",
238 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
239 "secret": "masterpassphrase",
240 "fee_mult_max": "NotAFeeMultiplier",
243 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
244 "Amount": "1000000000",
245 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
246 "TransactionType": "Payment"
249 {{"Invalid field 'fee_mult_max', not a positive integer.",
250 "Invalid field 'fee_mult_max', not a positive integer.",
251 "Missing field 'tx_json.Fee'.",
252 "Missing field 'tx_json.SigningPubKey'."}}},
254 {
"Invalid 'fee_div_max' field.",
257 "command": "doesnt_matter",
258 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
259 "secret": "masterpassphrase",
261 "fee_div_max": "NotAFeeMultiplier",
264 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
265 "Amount": "1000000000",
266 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
267 "TransactionType": "Payment"
270 {{"Invalid field 'fee_div_max', not a positive integer.",
271 "Invalid field 'fee_div_max', not a positive integer.",
272 "Missing field 'tx_json.Fee'.",
273 "Missing field 'tx_json.SigningPubKey'."}}},
275 {
"Invalid value for 'fee_mult_max' field.",
278 "command": "doesnt_matter",
279 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
280 "secret": "masterpassphrase",
284 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
285 "Amount": "1000000000",
286 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
287 "TransactionType": "Payment"
290 {{"Fee of 10 exceeds the requested tx limit of 0",
291 "Fee of 10 exceeds the requested tx limit of 0",
292 "Missing field 'tx_json.Fee'.",
293 "Missing field 'tx_json.SigningPubKey'."}}},
295 {
"Invalid value for 'fee_div_max' field.",
298 "command": "doesnt_matter",
299 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
300 "secret": "masterpassphrase",
305 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
306 "Amount": "1000000000",
307 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
308 "TransactionType": "Payment"
311 {{"Fee of 10 exceeds the requested tx limit of 5",
312 "Fee of 10 exceeds the requested tx limit of 5",
313 "Missing field 'tx_json.Fee'.",
314 "Missing field 'tx_json.SigningPubKey'."}}},
316 {
"Invalid zero value for 'fee_div_max' field.",
319 "command": "doesnt_matter",
320 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
321 "secret": "masterpassphrase",
326 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
327 "Amount": "1000000000",
328 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
329 "TransactionType": "Payment"
332 {{"Invalid field 'fee_div_max', not a positive integer.",
333 "Invalid field 'fee_div_max', not a positive integer.",
334 "Missing field 'tx_json.Fee'.",
335 "Missing field 'tx_json.SigningPubKey'."}}},
337 {
"Missing 'Amount'.",
340 "command": "doesnt_matter",
341 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
342 "secret": "masterpassphrase",
344 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
345 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
346 "TransactionType": "Payment"
349 {{"Missing field 'tx_json.Amount'.",
350 "Missing field 'tx_json.Amount'.",
351 "Missing field 'tx_json.Sequence'.",
352 "Missing field 'tx_json.Sequence'."}}},
354 {
"Invalid 'Amount'.",
357 "command": "doesnt_matter",
358 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
359 "secret": "masterpassphrase",
361 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
362 "Amount": "NotAnAmount",
363 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
364 "TransactionType": "Payment"
367 {{"Invalid field 'tx_json.Amount'.",
368 "Invalid field 'tx_json.Amount'.",
369 "Missing field 'tx_json.Sequence'.",
370 "Missing field 'tx_json.Sequence'."}}},
372 {
"Missing 'Destination'.",
375 "command": "doesnt_matter",
376 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
377 "secret": "masterpassphrase",
379 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
380 "Amount": "1000000000",
381 "TransactionType": "Payment"
384 {{"Missing field 'tx_json.Destination'.",
385 "Missing field 'tx_json.Destination'.",
386 "Missing field 'tx_json.Sequence'.",
387 "Missing field 'tx_json.Sequence'."}}},
389 {
"Invalid 'Destination'.",
392 "command": "doesnt_matter",
393 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
394 "secret": "masterpassphrase",
396 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
397 "Amount": "1000000000",
398 "Destination": "NotADestination",
399 "TransactionType": "Payment"
402 {{"Invalid field 'tx_json.Destination'.",
403 "Invalid field 'tx_json.Destination'.",
404 "Missing field 'tx_json.Sequence'.",
405 "Missing field 'tx_json.Sequence'."}}},
407 {
"Cannot create XRP to XRP paths.",
410 "command": "doesnt_matter",
411 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
412 "secret": "masterpassphrase",
415 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
416 "Amount": "1000000000",
417 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
418 "TransactionType": "Payment"
421 {{"Cannot build XRP to XRP paths.",
422 "Cannot build XRP to XRP paths.",
423 "Missing field 'tx_json.Sequence'.",
424 "Missing field 'tx_json.Sequence'."}}},
426 {
"Successful 'build_path'.",
429 "command": "doesnt_matter",
430 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
431 "secret": "masterpassphrase",
434 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
438 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
440 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
441 "TransactionType": "Payment"
446 "Missing field 'tx_json.Sequence'.",
447 "Missing field 'tx_json.Sequence'."}}},
449 {
"Not valid to include both 'Paths' and 'build_path'.",
452 "command": "doesnt_matter",
453 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
454 "secret": "masterpassphrase",
457 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
461 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
463 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
465 "TransactionType": "Payment"
468 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
469 "Cannot specify both 'tx_json.Paths' and 'build_path'",
470 "Missing field 'tx_json.Sequence'.",
471 "Missing field 'tx_json.Sequence'."}}},
473 {
"Successful 'SendMax'.",
476 "command": "doesnt_matter",
477 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
478 "secret": "masterpassphrase",
481 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
485 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
490 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
492 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
493 "TransactionType": "Payment"
498 "Missing field 'tx_json.Sequence'.",
499 "Missing field 'tx_json.Sequence'."}}},
501 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
504 "command": "doesnt_matter",
505 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
506 "secret": "masterpassphrase",
509 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
513 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
516 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
517 "TransactionType": "Payment"
522 "Missing field 'tx_json.Sequence'.",
523 "Missing field 'tx_json.Sequence'."}}},
525 {
"'secret' must be present.",
528 "command": "doesnt_matter",
529 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
531 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
532 "Amount": "1000000000",
533 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
534 "TransactionType": "Payment"
537 {{"Missing field 'secret'.",
538 "Missing field 'secret'.",
539 "Missing field 'tx_json.Sequence'.",
540 "Missing field 'tx_json.Sequence'."}}},
542 {
"'secret' must be non-empty.",
545 "command": "doesnt_matter",
546 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
549 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
550 "Amount": "1000000000",
551 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
552 "TransactionType": "Payment"
555 {{"Invalid field 'secret'.",
556 "Invalid field 'secret'.",
557 "Missing field 'tx_json.Sequence'.",
558 "Missing field 'tx_json.Sequence'."}}},
560 {
"Use 'seed' instead of 'secret'.",
563 "command": "doesnt_matter",
564 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
565 "key_type": "ed25519",
566 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
568 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
569 "Amount": "1000000000",
570 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
571 "TransactionType": "Payment"
576 "Missing field 'tx_json.Sequence'.",
577 "Missing field 'tx_json.Sequence'."}}},
579 {
"Malformed 'seed'.",
582 "command": "doesnt_matter",
583 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
584 "key_type": "ed25519",
585 "seed": "not a seed",
587 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
588 "Amount": "1000000000",
589 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
590 "TransactionType": "Payment"
593 {{"Disallowed seed.",
595 "Missing field 'tx_json.Sequence'.",
596 "Missing field 'tx_json.Sequence'."}}},
598 {
"'tx_json' must be present.",
601 "command": "doesnt_matter",
602 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
603 "secret": "masterpassphrase",
605 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
606 "Amount": "1000000000",
607 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
608 "TransactionType": "Payment"
611 {{"Missing field 'tx_json'.",
612 "Missing field 'tx_json'.",
613 "Missing field 'tx_json'.",
614 "Missing field 'tx_json'."}}},
616 {
"'TransactionType' must be present.",
619 "command": "doesnt_matter",
620 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
621 "secret": "masterpassphrase",
623 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
624 "Amount": "1000000000",
625 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
628 {{"Missing field 'tx_json.TransactionType'.",
629 "Missing field 'tx_json.TransactionType'.",
630 "Missing field 'tx_json.Sequence'.",
631 "Missing field 'tx_json.Sequence'."}}},
633 {
"The 'TransactionType' must be a pre-established transaction type.",
636 "command": "doesnt_matter",
637 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
638 "secret": "masterpassphrase",
640 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
641 "Amount": "1000000000",
642 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
643 "TransactionType": "tt"
646 {{"Field 'tx_json.TransactionType' has invalid data.",
647 "Field 'tx_json.TransactionType' has invalid data.",
648 "Missing field 'tx_json.Sequence'.",
649 "Missing field 'tx_json.Sequence'."}}},
651 {
"The 'TransactionType' may be represented with an integer.",
654 "command": "doesnt_matter",
655 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
656 "secret": "masterpassphrase",
658 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
659 "Amount": "1000000000",
660 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
666 "Missing field 'tx_json.Sequence'.",
667 "Missing field 'tx_json.Sequence'."}}},
669 {
"'Account' must be present.",
672 "command": "doesnt_matter",
673 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
674 "secret": "masterpassphrase",
676 "Amount": "1000000000",
677 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
678 "TransactionType": "Payment"
681 {{"Missing field 'tx_json.Account'.",
682 "Missing field 'tx_json.Account'.",
683 "Missing field 'tx_json.Sequence'.",
684 "Missing field 'tx_json.Sequence'."}}},
686 {
"'Account' must be well formed.",
689 "command": "doesnt_matter",
690 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
691 "secret": "masterpassphrase",
693 "Account": "NotAnAccount",
694 "Amount": "1000000000",
695 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
696 "TransactionType": "Payment"
699 {{"Invalid field 'tx_json.Account'.",
700 "Invalid field 'tx_json.Account'.",
701 "Missing field 'tx_json.Sequence'.",
702 "Missing field 'tx_json.Sequence'."}}},
704 {
"The 'offline' tag may be added to the transaction.",
707 "command": "doesnt_matter",
708 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
709 "secret": "masterpassphrase",
712 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
713 "Amount": "1000000000",
714 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
715 "TransactionType": "Payment"
720 "Missing field 'tx_json.Sequence'.",
721 "Missing field 'tx_json.Sequence'."}}},
723 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
726 "command": "doesnt_matter",
727 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
728 "secret": "masterpassphrase",
732 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
733 "Amount": "1000000000",
734 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
735 "TransactionType": "Payment"
738 {{"Missing field 'tx_json.Sequence'.",
739 "Missing field 'tx_json.Sequence'.",
740 "Missing field 'tx_json.Sequence'.",
741 "Missing field 'tx_json.Sequence'."}}},
743 {
"If 'offline' is true then a 'Fee' field must be supplied.",
746 "command": "doesnt_matter",
747 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
748 "secret": "masterpassphrase",
752 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
753 "Amount": "1000000000",
754 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
755 "TransactionType": "Payment"
758 {{"Missing field 'tx_json.Fee'.",
759 "Missing field 'tx_json.Fee'.",
760 "Missing field 'tx_json.Fee'.",
761 "Missing field 'tx_json.SigningPubKey'."}}},
763 {
"Valid transaction if 'offline' is true.",
766 "command": "doesnt_matter",
767 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
768 "secret": "masterpassphrase",
773 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
774 "Amount": "1000000000",
775 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
776 "TransactionType": "Payment"
781 "A Signer may not be the transaction's Account "
782 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
783 "Missing field 'tx_json.SigningPubKey'."}}},
785 {
"'offline' and 'build_path' are mutually exclusive.",
788 "command": "doesnt_matter",
789 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
790 "secret": "masterpassphrase",
796 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
797 "Amount": "1000000000",
798 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
799 "TransactionType": "Payment"
802 {{"Field 'build_path' not allowed in this context.",
803 "Field 'build_path' not allowed in this context.",
804 "Field 'build_path' not allowed in this context.",
805 "Missing field 'tx_json.SigningPubKey'."}}},
807 {
"A 'Flags' field may be specified.",
810 "command": "doesnt_matter",
811 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
812 "secret": "masterpassphrase",
815 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
816 "Amount": "1000000000",
817 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
818 "TransactionType": "Payment"
823 "Missing field 'tx_json.Sequence'.",
824 "Missing field 'tx_json.Sequence'."}}},
826 {
"The 'Flags' field must be numeric.",
829 "command": "doesnt_matter",
830 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
831 "secret": "masterpassphrase",
833 "Flags": "NotGoodFlags",
834 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
835 "Amount": "1000000000",
836 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
837 "TransactionType": "Payment"
840 {{"Field 'tx_json.Flags' has invalid data.",
841 "Field 'tx_json.Flags' has invalid data.",
842 "Missing field 'tx_json.Sequence'.",
843 "Missing field 'tx_json.Sequence'."}}},
845 {
"It's okay to add a 'debug_signing' field.",
848 "command": "doesnt_matter",
849 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
850 "secret": "masterpassphrase",
853 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
854 "Amount": "1000000000",
855 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
856 "TransactionType": "Payment"
861 "Missing field 'tx_json.Sequence'.",
862 "Missing field 'tx_json.Sequence'."}}},
864 {
"Single-sign a multisigned transaction.",
867 "command": "doesnt_matter",
868 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
871 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
872 "Amount" : "1000000000",
873 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
879 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
880 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
881 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
885 "SigningPubKey" : "",
886 "TransactionType" : "Payment"
889 {{"Already multisigned.",
890 "Already multisigned.",
891 "Secret does not match account.",
894 {
"Minimal sign_for.",
897 "command": "doesnt_matter",
898 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
899 "secret": "masterpassphrase",
901 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
902 "Amount": "1000000000",
903 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
907 "TransactionType": "Payment"
910 {{"Secret does not match account.",
911 "Secret does not match account.",
913 "Missing field 'tx_json.Signers'."}}},
915 {
"Minimal offline sign_for.",
918 "command": "doesnt_matter",
919 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
920 "secret": "masterpassphrase",
923 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
924 "Amount": "1000000000",
925 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
929 "TransactionType": "Payment"
932 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
934 {
"Offline sign_for using 'seed' instead of 'secret'.",
937 "command": "doesnt_matter",
938 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
939 "key_type": "ed25519",
940 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
943 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
944 "Amount": "1000000000",
945 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
949 "TransactionType": "Payment"
952 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
954 {
"Malformed seed in sign_for.",
957 "command": "doesnt_matter",
958 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
959 "key_type": "ed25519",
960 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
963 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
964 "Amount": "1000000000",
965 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
969 "TransactionType": "Payment"
972 {{"Disallowed seed.",
975 "Missing field 'tx_json.Signers'."}}},
977 {
"Missing 'Account' in sign_for.",
980 "command": "doesnt_matter",
981 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
982 "secret": "masterpassphrase",
984 "Amount": "1000000000",
985 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
989 "TransactionType": "Payment"
992 {{"Missing field 'tx_json.Account'.",
993 "Missing field 'tx_json.Account'.",
994 "Missing field 'tx_json.Account'.",
995 "Missing field 'tx_json.Account'."}}},
997 {
"Missing 'Amount' in sign_for.",
1000 "command": "doesnt_matter",
1001 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1002 "secret": "masterpassphrase",
1004 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1005 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1008 "SigningPubKey": "",
1009 "TransactionType": "Payment"
1012 {{"Missing field 'tx_json.Amount'.",
1013 "Missing field 'tx_json.Amount'.",
1014 "Missing field 'tx_json.Amount'.",
1015 "Missing field 'tx_json.Amount'."}}},
1017 {
"Missing 'Destination' in sign_for.",
1020 "command": "doesnt_matter",
1021 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1022 "secret": "masterpassphrase",
1024 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1025 "Amount": "1000000000",
1028 "SigningPubKey": "",
1029 "TransactionType": "Payment"
1032 {{"Missing field 'tx_json.Destination'.",
1033 "Missing field 'tx_json.Destination'.",
1034 "Missing field 'tx_json.Destination'.",
1035 "Missing field 'tx_json.Destination'."}}},
1037 {
"Missing 'Destination' in sign_for, use DeliverMax",
1040 "command": "doesnt_matter",
1041 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1042 "secret": "masterpassphrase",
1044 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1045 "DeliverMax": "1000000000",
1048 "SigningPubKey": "",
1049 "TransactionType": "Payment"
1052 {{"Missing field 'tx_json.Destination'.",
1053 "Missing field 'tx_json.Destination'.",
1054 "Missing field 'tx_json.Destination'.",
1055 "Missing field 'tx_json.Destination'."}}},
1057 {
"Missing 'Fee' in sign_for.",
1060 "command": "doesnt_matter",
1061 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1062 "secret": "masterpassphrase",
1064 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1065 "Amount": "1000000000",
1066 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1068 "SigningPubKey": "",
1069 "TransactionType": "Payment"
1072 {{"Secret does not match account.",
1073 "Secret does not match account.",
1074 "Missing field 'tx_json.Fee'.",
1075 "Missing field 'tx_json.Fee'."}}},
1077 {
"Missing 'Sequence' in sign_for.",
1080 "command": "doesnt_matter",
1081 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1082 "secret": "masterpassphrase",
1084 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1085 "Amount": "1000000000",
1086 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1088 "SigningPubKey": "",
1089 "TransactionType": "Payment"
1092 {{"Secret does not match account.",
1093 "Secret does not match account.",
1094 "Missing field 'tx_json.Sequence'.",
1095 "Missing field 'tx_json.Sequence'."}}},
1097 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1100 "command": "doesnt_matter",
1101 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1102 "secret": "masterpassphrase",
1104 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1105 "Amount": "1000000000",
1106 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1109 "TransactionType": "Payment"
1112 {{"Secret does not match account.",
1113 "Secret does not match account.",
1115 "Missing field 'tx_json.SigningPubKey'."}}},
1117 {
"In sign_for, an account may not sign for itself.",
1120 "command": "doesnt_matter",
1121 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1124 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1125 "Amount": "1000000000",
1126 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1129 "TransactionType": "Payment"
1134 "A Signer may not be the transaction's Account "
1135 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1136 "Missing field 'tx_json.SigningPubKey'."}}},
1138 {
"Cannot put duplicate accounts in Signers array",
1141 "command": "doesnt_matter",
1142 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1143 "secret": "masterpassphrase",
1145 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1146 "Amount" : "1000000000",
1147 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1153 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1154 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1155 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1159 "SigningPubKey" : "",
1160 "TransactionType" : "Payment"
1163 {{"Already multisigned.",
1164 "Already multisigned.",
1165 "Duplicate Signers:Signer:Account entries "
1166 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1169 {
"Correctly append to pre-established Signers array",
1172 "command": "doesnt_matter",
1173 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1176 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1177 "Amount" : "1000000000",
1178 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1184 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1185 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1186 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1190 "SigningPubKey" : "",
1191 "TransactionType" : "Payment"
1194 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1196 {
"Append to pre-established Signers array with bad signature",
1199 "command": "doesnt_matter",
1200 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1203 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1204 "Amount" : "1000000000",
1205 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1211 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1212 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1213 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1217 "SigningPubKey" : "",
1218 "TransactionType" : "Payment"
1221 {{"Already multisigned.",
1222 "Already multisigned.",
1223 "Invalid signature.",
1224 "Invalid signature."}}},
1226 {
"Non-empty 'SigningPubKey' in sign_for.",
1229 "command": "doesnt_matter",
1230 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1231 "secret": "masterpassphrase",
1233 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1234 "Amount": "1000000000",
1235 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1238 "SigningPubKey": "1",
1239 "TransactionType": "Payment"
1242 {{"Secret does not match account.",
1243 "Secret does not match account.",
1244 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1245 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1247 {
"Missing 'TransactionType' in sign_for.",
1250 "command": "doesnt_matter",
1251 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1252 "secret": "masterpassphrase",
1254 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1255 "Amount": "1000000000",
1256 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1259 "SigningPubKey": "",
1262 {{"Missing field 'tx_json.TransactionType'.",
1263 "Missing field 'tx_json.TransactionType'.",
1264 "Missing field 'tx_json.TransactionType'.",
1265 "Missing field 'tx_json.TransactionType'."}}},
1267 {
"TxnSignature in sign_for.",
1270 "command": "doesnt_matter",
1271 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1274 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1275 "Amount" : "1000000000",
1276 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1282 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1283 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1284 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1288 "SigningPubKey" : "",
1289 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1290 "TransactionType" : "Payment"
1293 {{"Already multisigned.",
1294 "Already multisigned.",
1295 "Already single-signed.",
1296 "Signing of transaction is malformed."}}},
1298 {
"Invalid field 'tx_json': string instead of object",
1301 "command": "doesnt_matter",
1302 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1303 "secret": "masterpassphrase",
1306 {{"Invalid field 'tx_json', not object.",
1307 "Invalid field 'tx_json', not object.",
1308 "Invalid field 'tx_json', not object.",
1309 "Invalid field 'tx_json', not object."}}},
1311 {
"Invalid field 'tx_json': integer instead of object",
1314 "command": "doesnt_matter",
1315 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1316 "secret": "masterpassphrase",
1319 {{"Invalid field 'tx_json', not object.",
1320 "Invalid field 'tx_json', not object.",
1321 "Invalid field 'tx_json', not object.",
1322 "Invalid field 'tx_json', not object."}}},
1324 {
"Invalid field 'tx_json': array instead of object",
1327 "command": "doesnt_matter",
1328 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1329 "secret": "masterpassphrase",
1330 "tx_json": [ "hello", "world" ]
1332 {{"Invalid field 'tx_json', not object.",
1333 "Invalid field 'tx_json', not object.",
1334 "Invalid field 'tx_json', not object.",
1335 "Invalid field 'tx_json', not object."}}},
1337 {
"Minimal submit_multisigned.",
1340 "command": "submit_multisigned",
1342 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1343 "Amount": "1000000000",
1344 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1350 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1351 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1352 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1356 "SigningPubKey": "",
1357 "TransactionType": "Payment"
1360 {{"Missing field 'secret'.",
1361 "Missing field 'secret'.",
1362 "Missing field 'account'.",
1365 {
"Minimal submit_multisigned with bad signature.",
1368 "command": "submit_multisigned",
1370 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1371 "Amount": "1000000000",
1372 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1378 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1379 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1380 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1384 "SigningPubKey": "",
1385 "TransactionType": "Payment"
1388 {{"Missing field 'secret'.",
1389 "Missing field 'secret'.",
1390 "Missing field 'account'.",
1391 "Invalid signature."}}},
1393 {
"Missing tx_json in submit_multisigned.",
1396 "command": "submit_multisigned",
1400 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1401 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1402 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1407 {{"Missing field 'secret'.",
1408 "Missing field 'secret'.",
1409 "Missing field 'account'.",
1410 "Missing field 'tx_json'."}}},
1412 {
"Missing sequence in submit_multisigned.",
1415 "command": "submit_multisigned",
1417 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1418 "Amount": "1000000000",
1419 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1424 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1425 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1426 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1430 "SigningPubKey": "",
1431 "TransactionType": "Payment"
1434 {{"Missing field 'secret'.",
1435 "Missing field 'secret'.",
1436 "Missing field 'account'.",
1437 "Missing field 'tx_json.Sequence'."}}},
1439 {
"Missing SigningPubKey in submit_multisigned.",
1442 "command": "submit_multisigned",
1444 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1445 "Amount": "1000000000",
1446 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1451 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1452 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1453 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1458 "TransactionType": "Payment"
1461 {{"Missing field 'secret'.",
1462 "Missing field 'secret'.",
1463 "Missing field 'account'.",
1464 "Missing field 'tx_json.SigningPubKey'."}}},
1466 {
"Non-empty SigningPubKey in submit_multisigned.",
1469 "command": "submit_multisigned",
1471 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1472 "Amount": "1000000000",
1473 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1479 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1480 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1481 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1485 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1486 "TransactionType": "Payment"
1489 {{"Missing field 'secret'.",
1490 "Missing field 'secret'.",
1491 "Missing field 'account'.",
1492 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1494 {
"Missing TransactionType in submit_multisigned.",
1497 "command": "submit_multisigned",
1499 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1500 "Amount": "1000000000",
1501 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1506 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1507 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1508 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1513 "SigningPubKey": "",
1516 {{"Missing field 'secret'.",
1517 "Missing field 'secret'.",
1518 "Missing field 'account'.",
1519 "Missing field 'tx_json.TransactionType'."}}},
1521 {
"Missing Account in submit_multisigned.",
1524 "command": "submit_multisigned",
1526 "Amount": "1000000000",
1527 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1533 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1534 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1535 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1539 "SigningPubKey": "",
1540 "TransactionType": "Payment"
1543 {{"Missing field 'secret'.",
1544 "Missing field 'secret'.",
1545 "Missing field 'account'.",
1546 "Missing field 'tx_json.Account'."}}},
1548 {
"Malformed Account in submit_multisigned.",
1551 "command": "submit_multisigned",
1553 "Account": "NotAnAccount",
1554 "Amount": "1000000000",
1555 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1561 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1562 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1563 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1567 "SigningPubKey": "",
1568 "TransactionType": "Payment"
1571 {{"Missing field 'secret'.",
1572 "Missing field 'secret'.",
1573 "Missing field 'account'.",
1574 "Invalid field 'tx_json.Account'."}}},
1576 {
"Account not in ledger in submit_multisigned.",
1579 "command": "submit_multisigned",
1581 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1582 "Amount": "1000000000",
1583 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1589 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1590 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1591 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1595 "SigningPubKey": "",
1596 "TransactionType": "Payment"
1599 {{"Missing field 'secret'.",
1600 "Missing field 'secret'.",
1601 "Missing field 'account'.",
1602 "Source account not found."}}},
1604 {
"Missing Fee in submit_multisigned.",
1607 "command": "submit_multisigned",
1609 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1610 "Amount": "1000000000",
1611 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1616 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1617 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1618 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1622 "SigningPubKey": "",
1623 "TransactionType": "Payment"
1626 {{"Missing field 'secret'.",
1627 "Missing field 'secret'.",
1628 "Missing field 'account'.",
1629 "Missing field 'tx_json.Fee'."}}},
1631 {
"Non-numeric Fee in submit_multisigned.",
1634 "command": "submit_multisigned",
1636 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1637 "Amount": "1000000000",
1638 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1644 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1645 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1646 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1650 "SigningPubKey": "",
1651 "TransactionType": "Payment"
1654 {{"Missing field 'secret'.",
1655 "Missing field 'secret'.",
1656 "Missing field 'account'.",
1657 "Field 'tx_json.Fee' has invalid data."}}},
1659 {
"Missing Amount in submit_multisigned Payment.",
1662 "command": "submit_multisigned",
1664 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1665 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1671 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1672 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1673 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1677 "SigningPubKey": "",
1678 "TransactionType": "Payment"
1681 {{"Missing field 'secret'.",
1682 "Missing field 'secret'.",
1683 "Missing field 'account'.",
1684 "Missing field 'tx_json.Amount'."}}},
1686 {
"Invalid Amount in submit_multisigned Payment.",
1689 "command": "submit_multisigned",
1691 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1692 "Amount": "NotANumber",
1693 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1699 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1700 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1701 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1705 "SigningPubKey": "",
1706 "TransactionType": "Payment"
1709 {{"Missing field 'secret'.",
1710 "Missing field 'secret'.",
1711 "Missing field 'account'.",
1712 "Invalid field 'tx_json.Amount'."}}},
1714 {
"Invalid DeliverMax in submit_multisigned Payment.",
1717 "command": "submit_multisigned",
1719 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1720 "DeliverMax": "NotANumber",
1721 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1727 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1728 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1729 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1733 "SigningPubKey": "",
1734 "TransactionType": "Payment"
1737 {{"Missing field 'secret'.",
1738 "Missing field 'secret'.",
1739 "Missing field 'account'.",
1740 "Invalid field 'tx_json.Amount'."}}},
1742 {
"No build_path in submit_multisigned.",
1745 "command": "submit_multisigned",
1748 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1749 "Amount": "1000000000",
1750 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1756 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1757 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1758 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1762 "SigningPubKey": "",
1763 "TransactionType": "Payment"
1766 {{"Missing field 'secret'.",
1767 "Missing field 'secret'.",
1768 "Missing field 'account'.",
1769 "Field 'build_path' not allowed in this context."}}},
1771 {
"Missing Destination in submit_multisigned Payment.",
1774 "command": "submit_multisigned",
1776 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1777 "Amount": "1000000000",
1783 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1784 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1785 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1789 "SigningPubKey": "",
1790 "TransactionType": "Payment"
1793 {{"Missing field 'secret'.",
1794 "Missing field 'secret'.",
1795 "Missing field 'account'.",
1796 "Missing field 'tx_json.Destination'."}}},
1798 {
"Malformed Destination in submit_multisigned Payment.",
1801 "command": "submit_multisigned",
1803 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1804 "Amount": "1000000000",
1805 "Destination": "NotADestination",
1811 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1812 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1813 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1817 "SigningPubKey": "",
1818 "TransactionType": "Payment"
1821 {{"Missing field 'secret'.",
1822 "Missing field 'secret'.",
1823 "Missing field 'account'.",
1824 "Invalid field 'tx_json.Destination'."}}},
1826 {
"Missing Signers field in submit_multisigned.",
1829 "command": "submit_multisigned",
1831 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1832 "Amount": "1000000000",
1833 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1836 "SigningPubKey": "",
1837 "TransactionType": "Payment"
1840 {{"Missing field 'secret'.",
1841 "Missing field 'secret'.",
1842 "Missing field 'account'.",
1843 "Missing field 'tx_json.Signers'."}}},
1845 {
"Signers not an array in submit_multisigned.",
1848 "command": "submit_multisigned",
1850 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1851 "Amount": "1000000000",
1852 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1856 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1857 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1858 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1860 "SigningPubKey": "",
1861 "TransactionType": "Payment"
1864 {{"Missing field 'secret'.",
1865 "Missing field 'secret'.",
1866 "Missing field 'account'.",
1867 "Field 'tx_json.Signers' is not a JSON array."}}},
1869 {
"Empty Signers array in submit_multisigned.",
1872 "command": "submit_multisigned",
1874 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1875 "Amount": "1000000000",
1876 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1881 "SigningPubKey": "",
1882 "TransactionType": "Payment"
1885 {{"Missing field 'secret'.",
1886 "Missing field 'secret'.",
1887 "Missing field 'account'.",
1888 "tx_json.Signers array may not be empty."}}},
1890 {
"Duplicate Signer in submit_multisigned.",
1893 "command": "submit_multisigned",
1895 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1896 "Amount": "1000000000",
1897 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1903 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1904 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1905 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1910 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1911 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1912 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1916 "SigningPubKey": "",
1917 "TransactionType": "Payment"
1920 {{"Missing field 'secret'.",
1921 "Missing field 'secret'.",
1922 "Missing field 'account'.",
1923 "Duplicate Signers:Signer:Account entries "
1924 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1926 {
"Signer is tx_json Account in submit_multisigned.",
1929 "command": "submit_multisigned",
1931 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1932 "Amount": "1000000000",
1933 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1939 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1940 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1941 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1945 "SigningPubKey": "",
1946 "TransactionType": "Payment"
1949 {{"Missing field 'secret'.",
1950 "Missing field 'secret'.",
1951 "Missing field 'account'.",
1952 "A Signer may not be the transaction's Account "
1953 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1955 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1958 "command": "submit_multisigned",
1960 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1961 "DeliverMax": "10000000",
1962 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1967 "SigningPubKey": "",
1968 "TransactionType": "Payment"
1971 {{"Missing field 'secret'.",
1972 "Missing field 'secret'.",
1973 "Missing field 'account'.",
1974 "tx_json.Signers array may not be empty."}}},
1976 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1979 "command": "submit_multisigned",
1981 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1982 "Amount": "10000000",
1983 "DeliverMax": "10000000",
1984 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1989 "SigningPubKey": "",
1990 "TransactionType": "Payment"
1993 {{"Missing field 'secret'.",
1994 "Missing field 'secret'.",
1995 "Missing field 'account'.",
1996 "tx_json.Signers array may not be empty."}}},
1998 {
"Payment cannot specify different DeliverMax and Amount.",
2001 "command": "doesnt_matter",
2002 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2003 "secret": "masterpassphrase",
2006 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2007 "Amount": "1000000000",
2008 "DeliverMax": "1000000020",
2009 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2012 "SigningPubKey": "",
2013 "TransactionType": "Payment"
2016 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
2017 "Cannot specify differing 'Amount' and 'DeliverMax'",
2018 "Cannot specify differing 'Amount' and 'DeliverMax'",
2019 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
2031 env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2033 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2035 result[jss::result][jss::request][jss::command] ==
"bad_command");
2048 "{ \"fee_mult_max\" : 1, \"tx_json\" : { } } ", req);
2060 req[jss::tx_json].isMember(jss::Fee) &&
2061 req[jss::tx_json][jss::Fee] == 10);
2067 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2068 "\"tx_json\" : { } } ",
2081 req[jss::tx_json].isMember(jss::Fee) &&
2082 req[jss::tx_json][jss::Fee] == 10);
2088 "{ \"fee_mult_max\" : 0, \"tx_json\" : { } } ", req);
2099 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2107 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2108 "\"tx_json\" : { } } ",
2120 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2126 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2127 "\"tx_json\" : { } } ",
2139 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2145 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2146 "\"tx_json\" : { } } ",
2158 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2165 using namespace test::jtx;
2167 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2168 cfg->section(
"transaction_queue")
2169 .
set(
"minimum_txn_in_ledger_standalone",
"3");
2172 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2179 "fee_mult_max" : 1000,
2194 req[jss::tx_json].isMember(jss::Fee) &&
2195 req[jss::tx_json][jss::Fee] == 10);
2218 req[jss::tx_json].isMember(jss::Fee) &&
2219 req[jss::tx_json][jss::Fee] == 10);
2223 for (
auto i = 0; i < 4; ++i)
2225 env(noop(env.master));
2233 "fee_mult_max" : 1000,
2248 req[jss::tx_json].isMember(jss::Fee) &&
2249 req[jss::tx_json][jss::Fee] == 8889);
2271 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2279 "fee_mult_max" : 1000,
2294 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2302 "fee_mult_max" : 8000,
2318 req[jss::tx_json].isMember(jss::Fee) &&
2319 req[jss::tx_json][jss::Fee] == 8889);
2327 "fee_mult_max" : -5,
2369 "fee_mult_max" : -2,
2391 toSign[jss::tx_json] = noop(env.master);
2392 toSign[jss::secret] =
"masterpassphrase";
2393 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2394 auto result = rpcResult[jss::result];
2398 result[jss::tx_json].isMember(jss::Fee) &&
2399 result[jss::tx_json][jss::Fee] ==
"10");
2401 result[jss::tx_json].isMember(jss::Sequence) &&
2402 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2403 Json::ValueType::uintValue));
2411 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2412 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2414 env(noop(env.master));
2418 toSign[jss::tx_json] = noop(env.master);
2419 toSign[jss::secret] =
"masterpassphrase";
2420 toSign[jss::fee_mult_max] = 900;
2421 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2422 auto result = rpcResult[jss::result];
2426 result[jss::tx_json].isMember(jss::Fee) &&
2427 result[jss::tx_json][jss::Fee] ==
"7813");
2429 result[jss::tx_json].isMember(jss::Sequence) &&
2430 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2431 Json::ValueType::uintValue));
2439 auto& feeTrack = env.app().getFeeTrack();
2440 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2441 for (
int i = 0; i < 8; ++i)
2442 feeTrack.raiseLocalFee();
2443 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2447 toSign[jss::tx_json] = noop(env.master);
2448 toSign[jss::secret] =
"masterpassphrase";
2449 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2450 auto result = rpcResult[jss::result];
2454 result[jss::tx_json].isMember(jss::Fee) &&
2455 result[jss::tx_json][jss::Fee] ==
"47");
2457 result[jss::tx_json].isMember(jss::Sequence) &&
2458 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2459 Json::ValueType::uintValue));
2469 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2470 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2472 env(noop(env.master), fee(47));
2478 toSign[jss::tx_json] = noop(env.master);
2479 toSign[jss::secret] =
"masterpassphrase";
2481 toSign[jss::fee_mult_max] = 700;
2482 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2483 auto result = rpcResult[jss::result];
2487 result[jss::tx_json].isMember(jss::Fee) &&
2488 result[jss::tx_json][jss::Fee] ==
"6806");
2490 result[jss::tx_json].isMember(jss::Sequence) &&
2491 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2492 Json::ValueType::uintValue));
2510 using namespace std::chrono_literals;
2512 test::jtx::Account
const a{
"a"};
2513 test::jtx::Account
const g{
"g"};
2514 auto const USD = g[
"USD"];
2523 test::jtx::Env env(*
this);
2527 env(
trust(a, USD(1000)));
2528 env(
trust(env.master, USD(1000)));
2529 env(
pay(g, a, USD(50)));
2530 env(
pay(g, env.master, USD(50)));
2538 unsigned int apiVersion,
2546 unsigned int apiVersion,
2556 static TestStuff
const testFuncs[] = {
2563 "submit_multisigned",
2566 for (
auto testFunc : testFuncs)
2574 Throw<std::runtime_error>(
2575 "Internal JSONRPC_test error. Bad test JSON.");
2577 static Role const testedRoles[] = {
2580 for (
Role testRole : testedRoles)
2583 auto const signFn = get<0>(testFunc);
2584 if (signFn !=
nullptr)
2586 assert(get<1>(testFunc) ==
nullptr);
2597 auto const submitFn = get<1>(testFunc);
2598 assert(submitFn !=
nullptr);
2611 errStr = result[
"error_message"].
asString();
2613 if (errStr == txnTest.expMsg[get<3>(testFunc)])
2620 description << txnTest.description <<
" Called "
2621 << get<2>(testFunc) <<
"(). Got \'"
2623 fail(description.
str(), __FILE__, txnTest.line);