mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Improve TransactionErrorString messages.
This commit is contained in:
parent
057bd3189f
commit
9e7b23b733
@ -14,7 +14,7 @@ bilingual_str TransactionErrorString(const TransactionError err)
|
||||
case TransactionError::OK:
|
||||
return Untranslated("No error");
|
||||
case TransactionError::MISSING_INPUTS:
|
||||
return Untranslated("Missing inputs");
|
||||
return Untranslated("Inputs missing or spent");
|
||||
case TransactionError::ALREADY_IN_CHAIN:
|
||||
return Untranslated("Transaction already in block chain");
|
||||
case TransactionError::P2P_DISABLED:
|
||||
@ -24,11 +24,11 @@ bilingual_str TransactionErrorString(const TransactionError err)
|
||||
case TransactionError::MEMPOOL_ERROR:
|
||||
return Untranslated("AcceptToMemoryPool failed");
|
||||
case TransactionError::INVALID_PSBT:
|
||||
return Untranslated("PSBT is not sane");
|
||||
return Untranslated("PSBT is not well-formed");
|
||||
case TransactionError::PSBT_MISMATCH:
|
||||
return Untranslated("PSBTs not compatible (different transactions)");
|
||||
case TransactionError::SIGHASH_MISMATCH:
|
||||
return Untranslated("Specified sighash value does not match existing value");
|
||||
return Untranslated("Specified sighash value does not match value stored in PSBT");
|
||||
case TransactionError::MAX_FEE_EXCEEDED:
|
||||
return Untranslated("Fee exceeds maximum configured by -maxtxfee");
|
||||
// no default case, so the compiler can warn about missing cases
|
||||
|
@ -467,7 +467,7 @@ class PSBTTest(BitcoinTestFramework):
|
||||
assert_equal(analysis['next'], 'creator')
|
||||
assert_equal(analysis['error'], 'PSBT is not valid. Input 0 specifies invalid prevout')
|
||||
|
||||
assert_raises_rpc_error(-25, 'Missing inputs', self.nodes[0].walletprocesspsbt, 'cHNidP8BAJoCAAAAAkvEW8NnDtdNtDpsmze+Ht2LH35IJcKv00jKAlUs21RrAwAAAAD/////S8Rbw2cO1020OmybN74e3Ysffkglwq/TSMoCVSzbVGsBAAAAAP7///8CwLYClQAAAAAWABSNJKzjaUb3uOxixsvh1GGE3fW7zQD5ApUAAAAAFgAUKNw0x8HRctAgmvoevm4u1SbN7XIAAAAAAAEAnQIAAAACczMa321tVHuN4GKWKRncycI22aX3uXgwSFUKM2orjRsBAAAAAP7///9zMxrfbW1Ue43gYpYpGdzJwjbZpfe5eDBIVQozaiuNGwAAAAAA/v///wIA+QKVAAAAABl2qRT9zXUVA8Ls5iVqynLHe5/vSe1XyYisQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAAAAAQEfQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAA==')
|
||||
assert_raises_rpc_error(-25, 'Inputs missing or spent', self.nodes[0].walletprocesspsbt, 'cHNidP8BAJoCAAAAAkvEW8NnDtdNtDpsmze+Ht2LH35IJcKv00jKAlUs21RrAwAAAAD/////S8Rbw2cO1020OmybN74e3Ysffkglwq/TSMoCVSzbVGsBAAAAAP7///8CwLYClQAAAAAWABSNJKzjaUb3uOxixsvh1GGE3fW7zQD5ApUAAAAAFgAUKNw0x8HRctAgmvoevm4u1SbN7XIAAAAAAAEAnQIAAAACczMa321tVHuN4GKWKRncycI22aX3uXgwSFUKM2orjRsBAAAAAP7///9zMxrfbW1Ue43gYpYpGdzJwjbZpfe5eDBIVQozaiuNGwAAAAAA/v///wIA+QKVAAAAABl2qRT9zXUVA8Ls5iVqynLHe5/vSe1XyYisQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAAAAAQEfQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAA==')
|
||||
|
||||
if __name__ == '__main__':
|
||||
PSBTTest().main()
|
||||
|
Loading…
Reference in New Issue
Block a user