20 #include <ripple/app/misc/LoadFeeTrack.h>
21 #include <ripple/app/misc/TxQ.h>
22 #include <ripple/basics/SubmitSync.h>
23 #include <ripple/basics/contract.h>
24 #include <ripple/beast/unit_test.h>
25 #include <ripple/core/ConfigSections.h>
26 #include <ripple/json/json_reader.h>
27 #include <ripple/protocol/ErrorCodes.h>
28 #include <ripple/protocol/Feature.h>
29 #include <ripple/rpc/impl/TransactionSign.h>
31 #include <test/jtx/envconfig.h>
54 char const* description_,
76 "command": "doesnt_matter",
77 "secret": "masterpassphrase",
79 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
80 "Amount": "1000000000",
81 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
82 "TransactionType": "Payment"
87 "Missing field 'account'.",
88 "Missing field 'tx_json.Sequence'."}}},
90 {
"Pass in Fee with minimal payment.",
93 "command": "doesnt_matter",
94 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
95 "secret": "masterpassphrase",
98 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
99 "Amount": "1000000000",
100 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
101 "TransactionType": "Payment"
106 "Missing field 'tx_json.Sequence'.",
107 "Missing field 'tx_json.Sequence'."}}},
109 {
"Pass in Sequence.",
112 "command": "doesnt_matter",
113 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
114 "secret": "masterpassphrase",
117 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
118 "Amount": "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.",
131 "command": "doesnt_matter",
132 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
133 "secret": "masterpassphrase",
137 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
138 "Amount": "1000000000",
139 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
140 "TransactionType": "Payment"
145 "A Signer may not be the transaction's Account "
146 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
147 "Missing field 'tx_json.SigningPubKey'."}}},
149 {
"Add 'fee_mult_max' field.",
152 "command": "doesnt_matter",
153 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
154 "secret": "masterpassphrase",
158 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
159 "Amount": "1000000000",
160 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
161 "TransactionType": "Payment"
166 "Missing field 'tx_json.Fee'.",
167 "Missing field 'tx_json.SigningPubKey'."}}},
169 {
"Add 'fee_mult_max' and 'fee_div_max' field.",
172 "command": "doesnt_matter",
173 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
174 "secret": "masterpassphrase",
179 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
180 "Amount": "1000000000",
181 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
182 "TransactionType": "Payment"
187 "Missing field 'tx_json.Fee'.",
188 "Missing field 'tx_json.SigningPubKey'."}}},
190 {
"fee_mult_max is ignored if 'Fee' is present.",
193 "command": "doesnt_matter",
194 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
195 "secret": "masterpassphrase",
200 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
201 "Amount": "1000000000",
202 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
203 "TransactionType": "Payment"
208 "A Signer may not be the transaction's Account "
209 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
210 "Missing field 'tx_json.SigningPubKey'."}}},
212 {
"fee_div_max is ignored if 'Fee' is present.",
215 "command": "doesnt_matter",
216 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
217 "secret": "masterpassphrase",
223 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
224 "Amount": "1000000000",
225 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
226 "TransactionType": "Payment"
231 "A Signer may not be the transaction's Account "
232 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
233 "Missing field 'tx_json.SigningPubKey'."}}},
235 {
"Invalid 'fee_mult_max' field.",
238 "command": "doesnt_matter",
239 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
240 "secret": "masterpassphrase",
241 "fee_mult_max": "NotAFeeMultiplier",
244 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
245 "Amount": "1000000000",
246 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
247 "TransactionType": "Payment"
250 {{"Invalid field 'fee_mult_max', not a positive integer.",
251 "Invalid field 'fee_mult_max', not a positive integer.",
252 "Missing field 'tx_json.Fee'.",
253 "Missing field 'tx_json.SigningPubKey'."}}},
255 {
"Invalid 'fee_div_max' field.",
258 "command": "doesnt_matter",
259 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
260 "secret": "masterpassphrase",
262 "fee_div_max": "NotAFeeMultiplier",
265 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
266 "Amount": "1000000000",
267 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
268 "TransactionType": "Payment"
271 {{"Invalid field 'fee_div_max', not a positive integer.",
272 "Invalid field 'fee_div_max', not a positive integer.",
273 "Missing field 'tx_json.Fee'.",
274 "Missing field 'tx_json.SigningPubKey'."}}},
276 {
"Invalid value for 'fee_mult_max' field.",
279 "command": "doesnt_matter",
280 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
281 "secret": "masterpassphrase",
285 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
286 "Amount": "1000000000",
287 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
288 "TransactionType": "Payment"
291 {{"Fee of 10 exceeds the requested tx limit of 0",
292 "Fee of 10 exceeds the requested tx limit of 0",
293 "Missing field 'tx_json.Fee'.",
294 "Missing field 'tx_json.SigningPubKey'."}}},
296 {
"Invalid value for 'fee_div_max' field.",
299 "command": "doesnt_matter",
300 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
301 "secret": "masterpassphrase",
306 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
307 "Amount": "1000000000",
308 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
309 "TransactionType": "Payment"
312 {{"Fee of 10 exceeds the requested tx limit of 5",
313 "Fee of 10 exceeds the requested tx limit of 5",
314 "Missing field 'tx_json.Fee'.",
315 "Missing field 'tx_json.SigningPubKey'."}}},
317 {
"Invalid zero value for 'fee_div_max' field.",
320 "command": "doesnt_matter",
321 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
322 "secret": "masterpassphrase",
327 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
328 "Amount": "1000000000",
329 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
330 "TransactionType": "Payment"
333 {{"Invalid field 'fee_div_max', not a positive integer.",
334 "Invalid field 'fee_div_max', not a positive integer.",
335 "Missing field 'tx_json.Fee'.",
336 "Missing field 'tx_json.SigningPubKey'."}}},
338 {
"Missing 'Amount'.",
341 "command": "doesnt_matter",
342 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
343 "secret": "masterpassphrase",
345 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
346 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
347 "TransactionType": "Payment"
350 {{"Missing field 'tx_json.Amount'.",
351 "Missing field 'tx_json.Amount'.",
352 "Missing field 'tx_json.Sequence'.",
353 "Missing field 'tx_json.Sequence'."}}},
355 {
"Invalid 'Amount'.",
358 "command": "doesnt_matter",
359 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
360 "secret": "masterpassphrase",
362 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
363 "Amount": "NotAnAmount",
364 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
365 "TransactionType": "Payment"
368 {{"Invalid field 'tx_json.Amount'.",
369 "Invalid field 'tx_json.Amount'.",
370 "Missing field 'tx_json.Sequence'.",
371 "Missing field 'tx_json.Sequence'."}}},
373 {
"Missing 'Destination'.",
376 "command": "doesnt_matter",
377 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
378 "secret": "masterpassphrase",
380 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
381 "Amount": "1000000000",
382 "TransactionType": "Payment"
385 {{"Missing field 'tx_json.Destination'.",
386 "Missing field 'tx_json.Destination'.",
387 "Missing field 'tx_json.Sequence'.",
388 "Missing field 'tx_json.Sequence'."}}},
390 {
"Invalid 'Destination'.",
393 "command": "doesnt_matter",
394 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
395 "secret": "masterpassphrase",
397 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
398 "Amount": "1000000000",
399 "Destination": "NotADestination",
400 "TransactionType": "Payment"
403 {{"Invalid field 'tx_json.Destination'.",
404 "Invalid field 'tx_json.Destination'.",
405 "Missing field 'tx_json.Sequence'.",
406 "Missing field 'tx_json.Sequence'."}}},
408 {
"Cannot create XRP to XRP paths.",
411 "command": "doesnt_matter",
412 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
413 "secret": "masterpassphrase",
416 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
417 "Amount": "1000000000",
418 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
419 "TransactionType": "Payment"
422 {{"Cannot build XRP to XRP paths.",
423 "Cannot build XRP to XRP paths.",
424 "Missing field 'tx_json.Sequence'.",
425 "Missing field 'tx_json.Sequence'."}}},
427 {
"Successful 'build_path'.",
430 "command": "doesnt_matter",
431 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
432 "secret": "masterpassphrase",
435 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
439 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
441 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
442 "TransactionType": "Payment"
447 "Missing field 'tx_json.Sequence'.",
448 "Missing field 'tx_json.Sequence'."}}},
450 {
"Not valid to include both 'Paths' and 'build_path'.",
453 "command": "doesnt_matter",
454 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
455 "secret": "masterpassphrase",
458 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
462 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
464 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
466 "TransactionType": "Payment"
469 {{"Cannot specify both 'tx_json.Paths' and 'build_path'",
470 "Cannot specify both 'tx_json.Paths' and 'build_path'",
471 "Missing field 'tx_json.Sequence'.",
472 "Missing field 'tx_json.Sequence'."}}},
474 {
"Successful 'SendMax'.",
477 "command": "doesnt_matter",
478 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
479 "secret": "masterpassphrase",
482 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
486 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
491 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
493 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
494 "TransactionType": "Payment"
499 "Missing field 'tx_json.Sequence'.",
500 "Missing field 'tx_json.Sequence'."}}},
502 {
"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.",
505 "command": "doesnt_matter",
506 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
507 "secret": "masterpassphrase",
510 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
514 "issuer": "rLPwWB1itaUGMV8kbMLLysjGkEpTM2Soy4"
517 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
518 "TransactionType": "Payment"
523 "Missing field 'tx_json.Sequence'.",
524 "Missing field 'tx_json.Sequence'."}}},
526 {
"'secret' must be present.",
529 "command": "doesnt_matter",
530 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
532 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
533 "Amount": "1000000000",
534 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
535 "TransactionType": "Payment"
538 {{"Missing field 'secret'.",
539 "Missing field 'secret'.",
540 "Missing field 'tx_json.Sequence'.",
541 "Missing field 'tx_json.Sequence'."}}},
543 {
"'secret' must be non-empty.",
546 "command": "doesnt_matter",
547 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
550 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
551 "Amount": "1000000000",
552 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
553 "TransactionType": "Payment"
556 {{"Invalid field 'secret'.",
557 "Invalid field 'secret'.",
558 "Missing field 'tx_json.Sequence'.",
559 "Missing field 'tx_json.Sequence'."}}},
561 {
"Use 'seed' instead of 'secret'.",
564 "command": "doesnt_matter",
565 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
566 "key_type": "ed25519",
567 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
569 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
570 "Amount": "1000000000",
571 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
572 "TransactionType": "Payment"
577 "Missing field 'tx_json.Sequence'.",
578 "Missing field 'tx_json.Sequence'."}}},
580 {
"Malformed 'seed'.",
583 "command": "doesnt_matter",
584 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
585 "key_type": "ed25519",
586 "seed": "not a seed",
588 "Account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
589 "Amount": "1000000000",
590 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
591 "TransactionType": "Payment"
594 {{"Disallowed seed.",
596 "Missing field 'tx_json.Sequence'.",
597 "Missing field 'tx_json.Sequence'."}}},
599 {
"'tx_json' must be present.",
602 "command": "doesnt_matter",
603 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
604 "secret": "masterpassphrase",
606 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
607 "Amount": "1000000000",
608 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
609 "TransactionType": "Payment"
612 {{"Missing field 'tx_json'.",
613 "Missing field 'tx_json'.",
614 "Missing field 'tx_json'.",
615 "Missing field 'tx_json'."}}},
617 {
"'TransactionType' must be present.",
620 "command": "doesnt_matter",
621 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
622 "secret": "masterpassphrase",
624 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
625 "Amount": "1000000000",
626 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
629 {{"Missing field 'tx_json.TransactionType'.",
630 "Missing field 'tx_json.TransactionType'.",
631 "Missing field 'tx_json.Sequence'.",
632 "Missing field 'tx_json.Sequence'."}}},
634 {
"The 'TransactionType' must be a pre-established transaction type.",
637 "command": "doesnt_matter",
638 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
639 "secret": "masterpassphrase",
641 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
642 "Amount": "1000000000",
643 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
644 "TransactionType": "tt"
647 {{"Field 'tx_json.TransactionType' has invalid data.",
648 "Field 'tx_json.TransactionType' has invalid data.",
649 "Missing field 'tx_json.Sequence'.",
650 "Missing field 'tx_json.Sequence'."}}},
652 {
"The 'TransactionType' may be represented with an integer.",
655 "command": "doesnt_matter",
656 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
657 "secret": "masterpassphrase",
659 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
660 "Amount": "1000000000",
661 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
667 "Missing field 'tx_json.Sequence'.",
668 "Missing field 'tx_json.Sequence'."}}},
670 {
"'Account' must be present.",
673 "command": "doesnt_matter",
674 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
675 "secret": "masterpassphrase",
677 "Amount": "1000000000",
678 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
679 "TransactionType": "Payment"
682 {{"Missing field 'tx_json.Account'.",
683 "Missing field 'tx_json.Account'.",
684 "Missing field 'tx_json.Sequence'.",
685 "Missing field 'tx_json.Sequence'."}}},
687 {
"'Account' must be well formed.",
690 "command": "doesnt_matter",
691 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
692 "secret": "masterpassphrase",
694 "Account": "NotAnAccount",
695 "Amount": "1000000000",
696 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
697 "TransactionType": "Payment"
700 {{"Invalid field 'tx_json.Account'.",
701 "Invalid field 'tx_json.Account'.",
702 "Missing field 'tx_json.Sequence'.",
703 "Missing field 'tx_json.Sequence'."}}},
705 {
"The 'offline' tag may be added to the transaction.",
708 "command": "doesnt_matter",
709 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
710 "secret": "masterpassphrase",
713 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
714 "Amount": "1000000000",
715 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
716 "TransactionType": "Payment"
721 "Missing field 'tx_json.Sequence'.",
722 "Missing field 'tx_json.Sequence'."}}},
724 {
"If 'offline' is true then a 'Sequence' field must be supplied.",
727 "command": "doesnt_matter",
728 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
729 "secret": "masterpassphrase",
733 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
734 "Amount": "1000000000",
735 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
736 "TransactionType": "Payment"
739 {{"Missing field 'tx_json.Sequence'.",
740 "Missing field 'tx_json.Sequence'.",
741 "Missing field 'tx_json.Sequence'.",
742 "Missing field 'tx_json.Sequence'."}}},
744 {
"If 'offline' is true then a 'Fee' field must be supplied.",
747 "command": "doesnt_matter",
748 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
749 "secret": "masterpassphrase",
753 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
754 "Amount": "1000000000",
755 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
756 "TransactionType": "Payment"
759 {{"Missing field 'tx_json.Fee'.",
760 "Missing field 'tx_json.Fee'.",
761 "Missing field 'tx_json.Fee'.",
762 "Missing field 'tx_json.SigningPubKey'."}}},
764 {
"Valid transaction if 'offline' is true.",
767 "command": "doesnt_matter",
768 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
769 "secret": "masterpassphrase",
774 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
775 "Amount": "1000000000",
776 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
777 "TransactionType": "Payment"
782 "A Signer may not be the transaction's Account "
783 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh).",
784 "Missing field 'tx_json.SigningPubKey'."}}},
786 {
"'offline' and 'build_path' are mutually exclusive.",
789 "command": "doesnt_matter",
790 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
791 "secret": "masterpassphrase",
797 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
798 "Amount": "1000000000",
799 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
800 "TransactionType": "Payment"
803 {{"Field 'build_path' not allowed in this context.",
804 "Field 'build_path' not allowed in this context.",
805 "Field 'build_path' not allowed in this context.",
806 "Missing field 'tx_json.SigningPubKey'."}}},
808 {
"A 'Flags' field may be specified.",
811 "command": "doesnt_matter",
812 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
813 "secret": "masterpassphrase",
816 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
817 "Amount": "1000000000",
818 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
819 "TransactionType": "Payment"
824 "Missing field 'tx_json.Sequence'.",
825 "Missing field 'tx_json.Sequence'."}}},
827 {
"The 'Flags' field must be numeric.",
830 "command": "doesnt_matter",
831 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
832 "secret": "masterpassphrase",
834 "Flags": "NotGoodFlags",
835 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
836 "Amount": "1000000000",
837 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
838 "TransactionType": "Payment"
841 {{"Field 'tx_json.Flags' has invalid data.",
842 "Field 'tx_json.Flags' has invalid data.",
843 "Missing field 'tx_json.Sequence'.",
844 "Missing field 'tx_json.Sequence'."}}},
846 {
"It's okay to add a 'debug_signing' field.",
849 "command": "doesnt_matter",
850 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
851 "secret": "masterpassphrase",
854 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
855 "Amount": "1000000000",
856 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
857 "TransactionType": "Payment"
862 "Missing field 'tx_json.Sequence'.",
863 "Missing field 'tx_json.Sequence'."}}},
865 {
"Single-sign a multisigned transaction.",
868 "command": "doesnt_matter",
869 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
872 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
873 "Amount" : "1000000000",
874 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
880 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
881 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
882 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
886 "SigningPubKey" : "",
887 "TransactionType" : "Payment"
890 {{"Already multisigned.",
891 "Already multisigned.",
892 "Secret does not match account.",
895 {
"Minimal sign_for.",
898 "command": "doesnt_matter",
899 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
900 "secret": "masterpassphrase",
902 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
903 "Amount": "1000000000",
904 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
908 "TransactionType": "Payment"
911 {{"Secret does not match account.",
912 "Secret does not match account.",
914 "Missing field 'tx_json.Signers'."}}},
916 {
"Minimal offline sign_for.",
919 "command": "doesnt_matter",
920 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
921 "secret": "masterpassphrase",
924 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
925 "Amount": "1000000000",
926 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
930 "TransactionType": "Payment"
933 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
935 {
"Offline sign_for using 'seed' instead of 'secret'.",
938 "command": "doesnt_matter",
939 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
940 "key_type": "ed25519",
941 "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd",
944 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
945 "Amount": "1000000000",
946 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
950 "TransactionType": "Payment"
953 {{"",
"",
"",
"Missing field 'tx_json.Signers'."}}},
955 {
"Malformed seed in sign_for.",
958 "command": "doesnt_matter",
959 "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
960 "key_type": "ed25519",
961 "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd",
964 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
965 "Amount": "1000000000",
966 "Destination": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi",
970 "TransactionType": "Payment"
973 {{"Disallowed seed.",
976 "Missing field 'tx_json.Signers'."}}},
978 {
"Missing 'Account' in sign_for.",
981 "command": "doesnt_matter",
982 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
983 "secret": "masterpassphrase",
985 "Amount": "1000000000",
986 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
990 "TransactionType": "Payment"
993 {{"Missing field 'tx_json.Account'.",
994 "Missing field 'tx_json.Account'.",
995 "Missing field 'tx_json.Account'.",
996 "Missing field 'tx_json.Account'."}}},
998 {
"Missing 'Amount' in sign_for.",
1001 "command": "doesnt_matter",
1002 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1003 "secret": "masterpassphrase",
1005 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1006 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1009 "SigningPubKey": "",
1010 "TransactionType": "Payment"
1013 {{"Missing field 'tx_json.Amount'.",
1014 "Missing field 'tx_json.Amount'.",
1015 "Missing field 'tx_json.Amount'.",
1016 "Missing field 'tx_json.Amount'."}}},
1018 {
"Missing 'Destination' in sign_for.",
1021 "command": "doesnt_matter",
1022 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1023 "secret": "masterpassphrase",
1025 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1026 "Amount": "1000000000",
1029 "SigningPubKey": "",
1030 "TransactionType": "Payment"
1033 {{"Missing field 'tx_json.Destination'.",
1034 "Missing field 'tx_json.Destination'.",
1035 "Missing field 'tx_json.Destination'.",
1036 "Missing field 'tx_json.Destination'."}}},
1038 {
"Missing 'Destination' in sign_for, use DeliverMax",
1041 "command": "doesnt_matter",
1042 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1043 "secret": "masterpassphrase",
1045 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1046 "DeliverMax": "1000000000",
1049 "SigningPubKey": "",
1050 "TransactionType": "Payment"
1053 {{"Missing field 'tx_json.Destination'.",
1054 "Missing field 'tx_json.Destination'.",
1055 "Missing field 'tx_json.Destination'.",
1056 "Missing field 'tx_json.Destination'."}}},
1058 {
"Missing 'Fee' in sign_for.",
1061 "command": "doesnt_matter",
1062 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1063 "secret": "masterpassphrase",
1065 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1066 "Amount": "1000000000",
1067 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1069 "SigningPubKey": "",
1070 "TransactionType": "Payment"
1073 {{"Secret does not match account.",
1074 "Secret does not match account.",
1075 "Missing field 'tx_json.Fee'.",
1076 "Missing field 'tx_json.Fee'."}}},
1078 {
"Missing 'Sequence' in sign_for.",
1081 "command": "doesnt_matter",
1082 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1083 "secret": "masterpassphrase",
1085 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1086 "Amount": "1000000000",
1087 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1089 "SigningPubKey": "",
1090 "TransactionType": "Payment"
1093 {{"Secret does not match account.",
1094 "Secret does not match account.",
1095 "Missing field 'tx_json.Sequence'.",
1096 "Missing field 'tx_json.Sequence'."}}},
1098 {
"Missing 'SigningPubKey' in sign_for is automatically filled in.",
1101 "command": "doesnt_matter",
1102 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1103 "secret": "masterpassphrase",
1105 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1106 "Amount": "1000000000",
1107 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1110 "TransactionType": "Payment"
1113 {{"Secret does not match account.",
1114 "Secret does not match account.",
1116 "Missing field 'tx_json.SigningPubKey'."}}},
1118 {
"In sign_for, an account may not sign for itself.",
1121 "command": "doesnt_matter",
1122 "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1125 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1126 "Amount": "1000000000",
1127 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1130 "TransactionType": "Payment"
1135 "A Signer may not be the transaction's Account "
1136 "(rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA).",
1137 "Missing field 'tx_json.SigningPubKey'."}}},
1139 {
"Cannot put duplicate accounts in Signers array",
1142 "command": "doesnt_matter",
1143 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1144 "secret": "masterpassphrase",
1146 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1147 "Amount" : "1000000000",
1148 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1154 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1155 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1156 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1160 "SigningPubKey" : "",
1161 "TransactionType" : "Payment"
1164 {{"Already multisigned.",
1165 "Already multisigned.",
1166 "Duplicate Signers:Signer:Account entries "
1167 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh) are not allowed.",
1170 {
"Correctly append to pre-established Signers array",
1173 "command": "doesnt_matter",
1174 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1177 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1178 "Amount" : "1000000000",
1179 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1185 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1186 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1187 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1191 "SigningPubKey" : "",
1192 "TransactionType" : "Payment"
1195 {{"Already multisigned.",
"Already multisigned.",
"",
""}}},
1197 {
"Append to pre-established Signers array with bad signature",
1200 "command": "doesnt_matter",
1201 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1204 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1205 "Amount" : "1000000000",
1206 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1212 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1213 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1214 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ACB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1218 "SigningPubKey" : "",
1219 "TransactionType" : "Payment"
1222 {{"Already multisigned.",
1223 "Already multisigned.",
1224 "Invalid signature.",
1225 "Invalid signature."}}},
1227 {
"Non-empty 'SigningPubKey' in sign_for.",
1230 "command": "doesnt_matter",
1231 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1232 "secret": "masterpassphrase",
1234 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1235 "Amount": "1000000000",
1236 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1239 "SigningPubKey": "1",
1240 "TransactionType": "Payment"
1243 {{"Secret does not match account.",
1244 "Secret does not match account.",
1245 "When multi-signing 'tx_json.SigningPubKey' must be empty.",
1246 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1248 {
"Missing 'TransactionType' in sign_for.",
1251 "command": "doesnt_matter",
1252 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1253 "secret": "masterpassphrase",
1255 "Account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1256 "Amount": "1000000000",
1257 "Destination": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1260 "SigningPubKey": "",
1263 {{"Missing field 'tx_json.TransactionType'.",
1264 "Missing field 'tx_json.TransactionType'.",
1265 "Missing field 'tx_json.TransactionType'.",
1266 "Missing field 'tx_json.TransactionType'."}}},
1268 {
"TxnSignature in sign_for.",
1271 "command": "doesnt_matter",
1272 "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1275 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1276 "Amount" : "1000000000",
1277 "Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1283 "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1284 "SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
1285 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998"
1289 "SigningPubKey" : "",
1290 "TxnSignature" : "304502210080EB23E78A841DDC5E3A4F10DE6EAF052207D6B519BF8954467ADB221B3F349002202CA458E8D4E4DE7176D27A91628545E7B295A5DFC8ADF0B5CD3E279B6FA02998",
1291 "TransactionType" : "Payment"
1294 {{"Already multisigned.",
1295 "Already multisigned.",
1296 "Already single-signed.",
1297 "Signing of transaction is malformed."}}},
1299 {
"Invalid field 'tx_json': string instead of object",
1302 "command": "doesnt_matter",
1303 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1304 "secret": "masterpassphrase",
1307 {{"Invalid field 'tx_json', not object.",
1308 "Invalid field 'tx_json', not object.",
1309 "Invalid field 'tx_json', not object.",
1310 "Invalid field 'tx_json', not object."}}},
1312 {
"Invalid field 'tx_json': integer instead of object",
1315 "command": "doesnt_matter",
1316 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1317 "secret": "masterpassphrase",
1320 {{"Invalid field 'tx_json', not object.",
1321 "Invalid field 'tx_json', not object.",
1322 "Invalid field 'tx_json', not object.",
1323 "Invalid field 'tx_json', not object."}}},
1325 {
"Invalid field 'tx_json': array instead of object",
1328 "command": "doesnt_matter",
1329 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1330 "secret": "masterpassphrase",
1331 "tx_json": [ "hello", "world" ]
1333 {{"Invalid field 'tx_json', not object.",
1334 "Invalid field 'tx_json', not object.",
1335 "Invalid field 'tx_json', not object.",
1336 "Invalid field 'tx_json', not object."}}},
1338 {
"Minimal submit_multisigned.",
1341 "command": "submit_multisigned",
1343 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1344 "Amount": "1000000000",
1345 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1351 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1352 "SigningPubKey" : "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1353 "TxnSignature" : "3045022100909D01399AFFAD1E30D250CE61F93975B7F61E47B5244D78C3E86D9806535D95022012E389E0ACB016334052B7FE07FA6CEFDC8BE82CB410FA841D5049641C89DC8F"
1357 "SigningPubKey": "",
1358 "TransactionType": "Payment"
1361 {{"Missing field 'secret'.",
1362 "Missing field 'secret'.",
1363 "Missing field 'account'.",
1366 {
"Minimal submit_multisigned with bad signature.",
1369 "command": "submit_multisigned",
1371 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1372 "Amount": "1000000000",
1373 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1379 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1380 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1381 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1385 "SigningPubKey": "",
1386 "TransactionType": "Payment"
1389 {{"Missing field 'secret'.",
1390 "Missing field 'secret'.",
1391 "Missing field 'account'.",
1392 "Invalid signature."}}},
1394 {
"Missing tx_json in submit_multisigned.",
1397 "command": "submit_multisigned",
1401 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1402 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1403 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1408 {{"Missing field 'secret'.",
1409 "Missing field 'secret'.",
1410 "Missing field 'account'.",
1411 "Missing field 'tx_json'."}}},
1413 {
"Missing sequence in submit_multisigned.",
1416 "command": "submit_multisigned",
1418 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1419 "Amount": "1000000000",
1420 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1425 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1426 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1427 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1431 "SigningPubKey": "",
1432 "TransactionType": "Payment"
1435 {{"Missing field 'secret'.",
1436 "Missing field 'secret'.",
1437 "Missing field 'account'.",
1438 "Missing field 'tx_json.Sequence'."}}},
1440 {
"Missing SigningPubKey in submit_multisigned.",
1443 "command": "submit_multisigned",
1445 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1446 "Amount": "1000000000",
1447 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1452 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1453 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1454 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1459 "TransactionType": "Payment"
1462 {{"Missing field 'secret'.",
1463 "Missing field 'secret'.",
1464 "Missing field 'account'.",
1465 "Missing field 'tx_json.SigningPubKey'."}}},
1467 {
"Non-empty SigningPubKey in submit_multisigned.",
1470 "command": "submit_multisigned",
1472 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1473 "Amount": "1000000000",
1474 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1480 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1481 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1482 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1486 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8",
1487 "TransactionType": "Payment"
1490 {{"Missing field 'secret'.",
1491 "Missing field 'secret'.",
1492 "Missing field 'account'.",
1493 "When multi-signing 'tx_json.SigningPubKey' must be empty."}}},
1495 {
"Missing TransactionType in submit_multisigned.",
1498 "command": "submit_multisigned",
1500 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1501 "Amount": "1000000000",
1502 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1507 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1508 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1509 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1514 "SigningPubKey": "",
1517 {{"Missing field 'secret'.",
1518 "Missing field 'secret'.",
1519 "Missing field 'account'.",
1520 "Missing field 'tx_json.TransactionType'."}}},
1522 {
"Missing Account in submit_multisigned.",
1525 "command": "submit_multisigned",
1527 "Amount": "1000000000",
1528 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1534 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1535 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1536 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1540 "SigningPubKey": "",
1541 "TransactionType": "Payment"
1544 {{"Missing field 'secret'.",
1545 "Missing field 'secret'.",
1546 "Missing field 'account'.",
1547 "Missing field 'tx_json.Account'."}}},
1549 {
"Malformed Account in submit_multisigned.",
1552 "command": "submit_multisigned",
1554 "Account": "NotAnAccount",
1555 "Amount": "1000000000",
1556 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1562 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1563 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1564 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1568 "SigningPubKey": "",
1569 "TransactionType": "Payment"
1572 {{"Missing field 'secret'.",
1573 "Missing field 'secret'.",
1574 "Missing field 'account'.",
1575 "Invalid field 'tx_json.Account'."}}},
1577 {
"Account not in ledger in submit_multisigned.",
1580 "command": "submit_multisigned",
1582 "Account": "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
1583 "Amount": "1000000000",
1584 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1590 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1591 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1592 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1596 "SigningPubKey": "",
1597 "TransactionType": "Payment"
1600 {{"Missing field 'secret'.",
1601 "Missing field 'secret'.",
1602 "Missing field 'account'.",
1603 "Source account not found."}}},
1605 {
"Missing Fee in submit_multisigned.",
1608 "command": "submit_multisigned",
1610 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1611 "Amount": "1000000000",
1612 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1617 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1618 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1619 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1623 "SigningPubKey": "",
1624 "TransactionType": "Payment"
1627 {{"Missing field 'secret'.",
1628 "Missing field 'secret'.",
1629 "Missing field 'account'.",
1630 "Missing field 'tx_json.Fee'."}}},
1632 {
"Non-numeric Fee in submit_multisigned.",
1635 "command": "submit_multisigned",
1637 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1638 "Amount": "1000000000",
1639 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1645 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1646 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1647 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1651 "SigningPubKey": "",
1652 "TransactionType": "Payment"
1655 {{"Missing field 'secret'.",
1656 "Missing field 'secret'.",
1657 "Missing field 'account'.",
1658 "Field 'tx_json.Fee' has invalid data."}}},
1660 {
"Missing Amount in submit_multisigned Payment.",
1663 "command": "submit_multisigned",
1665 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1666 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1672 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1673 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1674 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1678 "SigningPubKey": "",
1679 "TransactionType": "Payment"
1682 {{"Missing field 'secret'.",
1683 "Missing field 'secret'.",
1684 "Missing field 'account'.",
1685 "Missing field 'tx_json.Amount'."}}},
1687 {
"Invalid Amount in submit_multisigned Payment.",
1690 "command": "submit_multisigned",
1692 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1693 "Amount": "NotANumber",
1694 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1700 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1701 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1702 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1706 "SigningPubKey": "",
1707 "TransactionType": "Payment"
1710 {{"Missing field 'secret'.",
1711 "Missing field 'secret'.",
1712 "Missing field 'account'.",
1713 "Invalid field 'tx_json.Amount'."}}},
1715 {
"Invalid DeliverMax in submit_multisigned Payment.",
1718 "command": "submit_multisigned",
1720 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1721 "DeliverMax": "NotANumber",
1722 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1728 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1729 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1730 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1734 "SigningPubKey": "",
1735 "TransactionType": "Payment"
1738 {{"Missing field 'secret'.",
1739 "Missing field 'secret'.",
1740 "Missing field 'account'.",
1741 "Invalid field 'tx_json.Amount'."}}},
1743 {
"No build_path in submit_multisigned.",
1746 "command": "submit_multisigned",
1749 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1750 "Amount": "1000000000",
1751 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1757 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1758 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1759 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1763 "SigningPubKey": "",
1764 "TransactionType": "Payment"
1767 {{"Missing field 'secret'.",
1768 "Missing field 'secret'.",
1769 "Missing field 'account'.",
1770 "Field 'build_path' not allowed in this context."}}},
1772 {
"Missing Destination in submit_multisigned Payment.",
1775 "command": "submit_multisigned",
1777 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1778 "Amount": "1000000000",
1784 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1785 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1786 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1790 "SigningPubKey": "",
1791 "TransactionType": "Payment"
1794 {{"Missing field 'secret'.",
1795 "Missing field 'secret'.",
1796 "Missing field 'account'.",
1797 "Missing field 'tx_json.Destination'."}}},
1799 {
"Malformed Destination in submit_multisigned Payment.",
1802 "command": "submit_multisigned",
1804 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1805 "Amount": "1000000000",
1806 "Destination": "NotADestination",
1812 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1813 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1814 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1818 "SigningPubKey": "",
1819 "TransactionType": "Payment"
1822 {{"Missing field 'secret'.",
1823 "Missing field 'secret'.",
1824 "Missing field 'account'.",
1825 "Invalid field 'tx_json.Destination'."}}},
1827 {
"Missing Signers field in submit_multisigned.",
1830 "command": "submit_multisigned",
1832 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1833 "Amount": "1000000000",
1834 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1837 "SigningPubKey": "",
1838 "TransactionType": "Payment"
1841 {{"Missing field 'secret'.",
1842 "Missing field 'secret'.",
1843 "Missing field 'account'.",
1844 "Missing field 'tx_json.Signers'."}}},
1846 {
"Signers not an array in submit_multisigned.",
1849 "command": "submit_multisigned",
1851 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1852 "Amount": "1000000000",
1853 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1857 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1858 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1859 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1861 "SigningPubKey": "",
1862 "TransactionType": "Payment"
1865 {{"Missing field 'secret'.",
1866 "Missing field 'secret'.",
1867 "Missing field 'account'.",
1868 "Field 'tx_json.Signers' is not a JSON array."}}},
1870 {
"Empty Signers array in submit_multisigned.",
1873 "command": "submit_multisigned",
1875 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1876 "Amount": "1000000000",
1877 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1882 "SigningPubKey": "",
1883 "TransactionType": "Payment"
1886 {{"Missing field 'secret'.",
1887 "Missing field 'secret'.",
1888 "Missing field 'account'.",
1889 "tx_json.Signers array may not be empty."}}},
1891 {
"Duplicate Signer in submit_multisigned.",
1894 "command": "submit_multisigned",
1896 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1897 "Amount": "1000000000",
1898 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1904 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1905 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1906 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1911 "Account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
1912 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1913 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1917 "SigningPubKey": "",
1918 "TransactionType": "Payment"
1921 {{"Missing field 'secret'.",
1922 "Missing field 'secret'.",
1923 "Missing field 'account'.",
1924 "Duplicate Signers:Signer:Account entries "
1925 "(rPcNzota6B8YBokhYtcTNqQVCngtbnWfux) are not allowed."}}},
1927 {
"Signer is tx_json Account in submit_multisigned.",
1930 "command": "submit_multisigned",
1932 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1933 "Amount": "1000000000",
1934 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1940 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1941 "TxnSignature": "3045022100F9ED357606932697A4FAB2BE7F222C21DD93CA4CFDD90357AADD07465E8457D6022038173193E3DFFFB5D78DD738CC0905395F885DA65B98FDB9793901FE3FD26ECE",
1942 "SigningPubKey": "02FE36A690D6973D55F88553F5D2C4202DE75F2CF8A6D0E17C70AC223F044501F8"
1946 "SigningPubKey": "",
1947 "TransactionType": "Payment"
1950 {{"Missing field 'secret'.",
1951 "Missing field 'secret'.",
1952 "Missing field 'account'.",
1953 "A Signer may not be the transaction's Account "
1954 "(rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)."}}},
1956 {
"Empty Signers array in submit_multisigned, use DeliverMax",
1959 "command": "submit_multisigned",
1961 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1962 "DeliverMax": "10000000",
1963 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1968 "SigningPubKey": "",
1969 "TransactionType": "Payment"
1972 {{"Missing field 'secret'.",
1973 "Missing field 'secret'.",
1974 "Missing field 'account'.",
1975 "tx_json.Signers array may not be empty."}}},
1977 {
"Empty Signers array in submit_multisigned, use DeliverMax and Amount",
1980 "command": "submit_multisigned",
1982 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
1983 "Amount": "10000000",
1984 "DeliverMax": "10000000",
1985 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
1990 "SigningPubKey": "",
1991 "TransactionType": "Payment"
1994 {{"Missing field 'secret'.",
1995 "Missing field 'secret'.",
1996 "Missing field 'account'.",
1997 "tx_json.Signers array may not be empty."}}},
1999 {
"Payment cannot specify different DeliverMax and Amount.",
2002 "command": "doesnt_matter",
2003 "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2004 "secret": "masterpassphrase",
2007 "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
2008 "Amount": "1000000000",
2009 "DeliverMax": "1000000020",
2010 "Destination": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
2013 "SigningPubKey": "",
2014 "TransactionType": "Payment"
2017 {{"Cannot specify differing 'Amount' and 'DeliverMax'",
2018 "Cannot specify differing 'Amount' and 'DeliverMax'",
2019 "Cannot specify differing 'Amount' and 'DeliverMax'",
2020 "Cannot specify differing 'Amount' and 'DeliverMax'"}}},
2032 env.
rpc(
"bad_command", R
"({"MakingThisUp": 0})")};
2034 BEAST_EXPECT(result[jss::result][jss::error] == "unknownCmd");
2036 result[jss::result][jss::request][jss::command] ==
"bad_command");
2049 "{ \"fee_mult_max\" : 1, \"tx_json\" : { } } ", req);
2061 req[jss::tx_json].isMember(jss::Fee) &&
2062 req[jss::tx_json][jss::Fee] == 10);
2068 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 2, "
2069 "\"tx_json\" : { } } ",
2082 req[jss::tx_json].isMember(jss::Fee) &&
2083 req[jss::tx_json][jss::Fee] == 10);
2089 "{ \"fee_mult_max\" : 0, \"tx_json\" : { } } ", req);
2100 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2108 "{ \"fee_mult_max\" : 3, \"fee_div_max\" : 6, "
2109 "\"tx_json\" : { } } ",
2121 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2127 "{ \"fee_mult_max\" : 0, \"fee_div_max\" : 2, "
2128 "\"tx_json\" : { } } ",
2140 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2146 "{ \"fee_mult_max\" : 10, \"fee_div_max\" : 0, "
2147 "\"tx_json\" : { } } ",
2159 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2166 using namespace test::jtx;
2168 cfg->loadFromString(
"[" SECTION_SIGNING_SUPPORT
"]\ntrue");
2169 cfg->section(
"transaction_queue")
2170 .
set(
"minimum_txn_in_ledger_standalone",
"3");
2173 LoadFeeTrack const& feeTrackOuter = env.app().getFeeTrack();
2180 "fee_mult_max" : 1000,
2195 req[jss::tx_json].isMember(jss::Fee) &&
2196 req[jss::tx_json][jss::Fee] == 10);
2219 req[jss::tx_json].isMember(jss::Fee) &&
2220 req[jss::tx_json][jss::Fee] == 10);
2224 for (
auto i = 0; i < 4; ++i)
2226 env(noop(env.master));
2234 "fee_mult_max" : 1000,
2249 req[jss::tx_json].isMember(jss::Fee) &&
2250 req[jss::tx_json][jss::Fee] == 8889);
2272 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2280 "fee_mult_max" : 1000,
2295 BEAST_EXPECT(!req[jss::tx_json].isMember(jss::Fee));
2303 "fee_mult_max" : 8000,
2319 req[jss::tx_json].isMember(jss::Fee) &&
2320 req[jss::tx_json][jss::Fee] == 8889);
2328 "fee_mult_max" : -5,
2370 "fee_mult_max" : -2,
2392 toSign[jss::tx_json] = noop(env.master);
2393 toSign[jss::secret] =
"masterpassphrase";
2394 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2395 auto result = rpcResult[jss::result];
2399 result[jss::tx_json].isMember(jss::Fee) &&
2400 result[jss::tx_json][jss::Fee] ==
"10");
2402 result[jss::tx_json].isMember(jss::Sequence) &&
2403 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2404 Json::ValueType::uintValue));
2412 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2413 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2415 env(noop(env.master));
2419 toSign[jss::tx_json] = noop(env.master);
2420 toSign[jss::secret] =
"masterpassphrase";
2421 toSign[jss::fee_mult_max] = 900;
2422 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2423 auto result = rpcResult[jss::result];
2427 result[jss::tx_json].isMember(jss::Fee) &&
2428 result[jss::tx_json][jss::Fee] ==
"7813");
2430 result[jss::tx_json].isMember(jss::Sequence) &&
2431 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2432 Json::ValueType::uintValue));
2440 auto& feeTrack = env.app().getFeeTrack();
2441 BEAST_EXPECT(feeTrack.getLoadFactor() == 256);
2442 for (
int i = 0; i < 8; ++i)
2443 feeTrack.raiseLocalFee();
2444 BEAST_EXPECT(feeTrack.getLoadFactor() == 1220);
2448 toSign[jss::tx_json] = noop(env.master);
2449 toSign[jss::secret] =
"masterpassphrase";
2450 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2451 auto result = rpcResult[jss::result];
2455 result[jss::tx_json].isMember(jss::Fee) &&
2456 result[jss::tx_json][jss::Fee] ==
"47");
2458 result[jss::tx_json].isMember(jss::Sequence) &&
2459 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2460 Json::ValueType::uintValue));
2470 auto metrics = env.app().getTxQ().getMetrics(*env.current());
2471 if (metrics.openLedgerFeeLevel > metrics.minProcessingFeeLevel)
2473 env(noop(env.master), fee(47));
2479 toSign[jss::tx_json] = noop(env.master);
2480 toSign[jss::secret] =
"masterpassphrase";
2482 toSign[jss::fee_mult_max] = 700;
2483 auto rpcResult = env.rpc(
"json",
"sign",
to_string(toSign));
2484 auto result = rpcResult[jss::result];
2488 result[jss::tx_json].isMember(jss::Fee) &&
2489 result[jss::tx_json][jss::Fee] ==
"6806");
2491 result[jss::tx_json].isMember(jss::Sequence) &&
2492 result[jss::tx_json][jss::Sequence].isConvertibleTo(
2493 Json::ValueType::uintValue));
2511 using namespace std::chrono_literals;
2513 test::jtx::Account
const a{
"a"};
2514 test::jtx::Account
const g{
"g"};
2515 auto const USD = g[
"USD"];
2524 test::jtx::Env env(*
this);
2528 env(
trust(a, USD(1000)));
2529 env(
trust(env.master, USD(1000)));
2530 env(
pay(g, a, USD(50)));
2531 env(
pay(g, env.master, USD(50)));
2539 unsigned int apiVersion,
2547 unsigned int apiVersion,
2558 static TestStuff
const testFuncs[] = {
2565 "submit_multisigned",
2568 for (
auto testFunc : testFuncs)
2576 Throw<std::runtime_error>(
2577 "Internal JSONRPC_test error. Bad test JSON.");
2579 static Role const testedRoles[] = {
2582 for (
Role testRole : testedRoles)
2585 auto const signFn = get<0>(testFunc);
2586 if (signFn !=
nullptr)
2588 assert(get<1>(testFunc) ==
nullptr);
2599 auto const submitFn = get<1>(testFunc);
2600 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);