tests: Test that a fully signed tx given to signrawtx is unchanged #20562

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:test-signraw-fullysigned changing 1 files +14 −0
  1. achow101 commented at 7:49 PM on December 3, 2020: member

    Tests that a fully signed transaction given to signrawtransactionwithwallet is both unchanged and marked as complete. This tests for a regression in 0.20 where the transaction would not be marked as complete.

  2. achow101 cross-referenced this on Dec 3, 2020 from issue [0.20] wallet: Simplify and fix CWallet::SignTransaction by achow101
  3. tests: Test that a fully signed tx given to signrawtx is unchanged
    Tests that a fully signed transaction given to
    signrawtransactionwithwallet is both unchanged and marked as complete.
    This tests for a regression in 0.20 where the transaction would not be
    marked as complete.
    773c42b265
  4. in test/functional/rpc_signrawtransaction.py:156 in 2ae2c2244b outdated
     150 | @@ -151,6 +151,18 @@ def script_verification_error_test(self):
     151 |          assert_equal(rawTxSigned['errors'][1]['witness'], ["304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a0220573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee01", "025476c2e83188368da1ff3e292e7acafcdb3566bb0ad253f62fc70f07aeee6357"])
     152 |          assert not rawTxSigned['errors'][0]['witness']
     153 |  
     154 | +    def test_fully_signed_tx(self):
     155 | +        self.log.info("Test signing a fully signed transaction does nothing")
     156 | +        self.nodes[0].walletpassphrase("password", 10)
    


    MarcoFalke commented at 8:48 PM on December 3, 2020:
     test  2020-12-03T20:26:12.795000Z TestFramework (ERROR): JSONRPC error 
                                       Traceback (most recent call last):
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 126, in main
                                           self.run_test()
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/rpc_signrawtransaction.py", line 246, in run_test
                                           self.test_fully_signed_tx()
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/rpc_signrawtransaction.py", line 160, in test_fully_signed_tx
                                           signedtx = self.nodes[0].signrawtransactionwithwallet(fundedtx["hex"])
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/coverage.py", line 47, in __call__
                                           return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                                         File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/authproxy.py", line 146, in __call__
                                           raise JSONRPCException(response['error'], status)
                                       test_framework.authproxy.JSONRPCException: Error: Please enter the wallet passphrase with walletpassphrase first. (-13)
    
            self.nodes[0].walletpassphrase("password", 9999)
    

    Might be better to set this large and then lock the wallet before the function finishes


    achow101 commented at 8:54 PM on December 3, 2020:

    Done

  5. achow101 force-pushed on Dec 3, 2020
  6. DrahtBot added the label Tests on Dec 3, 2020
  7. MarcoFalke commented at 3:02 PM on December 4, 2020: member

    ACK 773c42b265 🕶

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK 773c42b265 🕶
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUha1gv/XgHMIh/EqliB1YQpgIwwwWbyJpVP1uoxoojFENGPB+Hu80/4G9+Gpw/T
    OdkNlz8PuT/gly469soblqNeSqnp3uxMQmdBgJK2nfVkOadRxndR8TuAe6toh4br
    s/QXwwxBH64i+PcFhnf6XAS/70Le6YFMnV7SJomoYEwM0V/hg+pLlxyLO9Z+59wG
    BIyYWlzYqWmOmKQB0mhJdqPJShhLAP2aE2Yq8WkXhhwEGsQ3A/4BmWH6OM/MEhar
    zs9itZnMZmJvdqr2FgInmx3dSCDhUzzGIX6uiV5woZUugcA3VoBKrH/IaRl0QUCS
    Ws+8FB0AYhy58ehEZr5mLdaBxt+jkwN57OBH8seVnUQkB6cprezYmBfVhyATS6v6
    NLDTN+ImY24GN4FAdJeDyUShMHyDBhEd/vS8JLkcVWUBrf6s7rTJu+fhWHpG4V8N
    vZkpCJTBCWlUWkvHVeEmD2syl6R2qTkvDT/4XE1nSL3RMFlq+SgQjrO3H1QyEdAD
    DhenVY/F
    =qjLG
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash fff4f23570aa3280ce63c038a5144a43576a405571aac17c5c1d193fa73087bc -

    </details>

  8. MarcoFalke merged this on Dec 4, 2020
  9. MarcoFalke closed this on Dec 4, 2020

  10. sidhujag referenced this in commit d56c478818 on Dec 4, 2020
  11. achow101 referenced this in commit 6a326cf66f on Dec 5, 2020
  12. MarcoFalke referenced this in commit 36ecf5eb87 on Mar 6, 2021
  13. MarcoFalke commented at 7:19 AM on March 6, 2021: member

    Backported in #20901

  14. Fabcien referenced this in commit 63f2f3ea1c on Jan 26, 2022
  15. bitcoin locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC