Skip to content

[account_tx with malformed values of limit returns either no error or not expected error] (Version: [2.3.0-b1]) #5138

@mounikakun

Description

@mounikakun

Issue Description

account_tx with below malformed limit value do not return expected error.

[0, 1.2, "10", True, False] >> returns no error
[-1, [], {}, "malformed", ["limit"], {"limit": 10}] >> returns internal error

Steps to Reproduce

Test data for limit:
[0, 1.2, "10", "malformed", True, False] >> returns no error
[-1, [], {}, ["limit"], {"limit": 10}] >> returns internal error

{
    "method": "account_tx",
    "params": [
        {
            "account": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
            "limit": true
        }
    ]
}

Expected Result

invalidParams error

Actual Result

{
    "result": {
        "account": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
        "ledger_index_max": 4201275,
        "ledger_index_min": 3996767,
        "limit": 1,
        "marker": {
            "ledger": 4093155,
            "seq": 6
        },
        "status": "success",
        "transactions": [
            {
                "meta": {
                    "AffectedNodes": [
                        {
                            "ModifiedNode": {
                                "FinalFields": {
                                    "Flags": 0,
                                    "Owner": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
                                    "RootIndex": "F023D4D20A93DE561D6322783EBA1012432C15FC9155F1ADABBA389D8C4D6FE3"
                                },
                                "LedgerEntryType": "DirectoryNode",
                                "LedgerIndex": "874DA51022AA198E20C569537FC4F593F34DFB315C80CEDA38065ED1287DA75E",
                                "PreviousTxnID": "66ECC147213545CE8F977A01A6DA8B5A0B44DDDAD28B2AFF03F8AD41557F38B7",
                                "PreviousTxnLgrSeq": 4093155
                            }
                        },
                        {
                            "CreatedNode": {
                                "LedgerEntryType": "Check",
                                "LedgerIndex": "A2BF8E58B0BC5612D38EE4B380FADACFEF452A289F2598D09596676CFA651D9C",
                                "NewFields": {
                                    "Account": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
                                    "Destination": "rLvxyK7RebZHhTFr6myiXd22u7YKbDtQsX",
                                    "DestinationNode": "1",
                                    "OwnerNode": "1",
                                    "SendMax": "1",
                                    "Sequence": 4093064
                                }
                            }
                        },
                        {
                            "ModifiedNode": {
                                "FinalFields": {
                                    "Account": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
                                    "Balance": "99999320",
                                    "Flags": 0,
                                    "OwnerCount": 34,
                                    "Sequence": 4093065
                                },
                                "LedgerEntryType": "AccountRoot",
                                "LedgerIndex": "AF4380767401E9A60CE216DAA680957EEC8100CC836826F418C18DC0FFB0D603",
                                "PreviousFields": {
                                    "Balance": "99999340",
                                    "OwnerCount": 33,
                                    "Sequence": 4093064
                                },
                                "PreviousTxnID": "66ECC147213545CE8F977A01A6DA8B5A0B44DDDAD28B2AFF03F8AD41557F38B7",
                                "PreviousTxnLgrSeq": 4093155
                            }
                        },
                        {
                            "ModifiedNode": {
                                "FinalFields": {
                                    "Flags": 0,
                                    "Owner": "rLvxyK7RebZHhTFr6myiXd22u7YKbDtQsX",
                                    "RootIndex": "8CD84A75B731161337274F5DFE9CD07C00B3C9AD0C9999B80CE3EE6DE1E0B8D0"
                                },
                                "LedgerEntryType": "DirectoryNode",
                                "LedgerIndex": "B25F71B6A2E0681B97732221F812CB68B5FB833288B2D60C6A40E70193F7DBD8",
                                "PreviousTxnID": "66ECC147213545CE8F977A01A6DA8B5A0B44DDDAD28B2AFF03F8AD41557F38B7",
                                "PreviousTxnLgrSeq": 4093155
                            }
                        },
                        {
                            "ModifiedNode": {
                                "LedgerEntryType": "AccountRoot",
                                "LedgerIndex": "FC534E3873C20BB8A501057AC9180A2639381525E470B24C3B69A95C20F40F5A",
                                "PreviousTxnID": "66ECC147213545CE8F977A01A6DA8B5A0B44DDDAD28B2AFF03F8AD41557F38B7",
                                "PreviousTxnLgrSeq": 4093155
                            }
                        }
                    ],
                    "TransactionIndex": 1,
                    "TransactionResult": "tesSUCCESS"
                },
                "tx": {
                    "Account": "rpU4XtUSB7vx7hnDbkJ7pdbqAHEEoxTL33",
                    "Destination": "rLvxyK7RebZHhTFr6myiXd22u7YKbDtQsX",
                    "Fee": "20",
                    "Flags": 2147483648,
                    "SendMax": "1",
                    "Sequence": 4093064,
                    "SigningPubKey": "EDA2D9DBD67B021B225531B867D65A10AA2799EA9A39B4A97DD684279B8ECA314B",
                    "TransactionType": "CheckCreate",
                    "TxnSignature": "DDDE5D6B9C6603FE60D7F56E1FE573B7F122E96D0D7683C32028C23C0D5C466AA299C8011BFC5187D147CA39965683EAE7D3FC83F5BCC8C07C85A1C0F4C5E809",
                    "date": 779482713,
                    "hash": "4395B30166E25126A1042E99D3333B1DD3BBE59FEAE60F037EEB751E18DE5293",
                    "inLedger": 4093157,
                    "ledger_index": 4093157
                },
                "validated": true
            }
        ],
        "validated": true
    }
}

Environment

Supporting Files

Metadata

Metadata

Assignees

Labels

BugGood First IssueGreat issue for a new contributorTriagedIssue/PR has been triaged for viability, liveliness, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions