rpc: update min package size error message in submitpackage

Currently, the only allowed package topology has a min size of 2.
Update the error message to reflect that.
This commit is contained in:
stickies-v
2024-01-22 15:51:31 +00:00
parent f9ece258aa
commit 1a875d4049
2 changed files with 5 additions and 5 deletions

View File

@ -343,10 +343,10 @@ class RPCPackagesTest(BitcoinTestFramework):
assert_raises_rpc_error(-25, "package topology disallowed", node.submitpackage, chain_hex)
assert_equal(legacy_pool, node.getrawmempool())
assert_raises_rpc_error(-8, f"Array must contain between 1 and {MAX_PACKAGE_COUNT} transactions.", node.submitpackage, [])
assert_raises_rpc_error(-25, "package topology disallowed", node.submitpackage, [chain_hex[0]] * 1)
assert_raises_rpc_error(-8, f"Array must contain between 2 and {MAX_PACKAGE_COUNT} transactions.", node.submitpackage, [])
assert_raises_rpc_error(-8, f"Array must contain between 2 and {MAX_PACKAGE_COUNT} transactions.", node.submitpackage, [chain_hex[0]] * 1)
assert_raises_rpc_error(
-8, f"Array must contain between 1 and {MAX_PACKAGE_COUNT} transactions.",
-8, f"Array must contain between 2 and {MAX_PACKAGE_COUNT} transactions.",
node.submitpackage, [chain_hex[0]] * (MAX_PACKAGE_COUNT + 1)
)