elements/src/script
Wladimir J. van der Laan 36fc8052f6
Merge #13309: Directly operate with CMutableTransaction in SignSignature
6b8b63af14 Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction (Martin Ankerl)

Pull request description:

  Refactored `TransactionSignatureCreator` into a templated `GenericTransactionSignatureCreator` that works with both `CMutableTransaction` and `CTransaction`.

  The advantage is that now in `SignSignature`, the `MutableTransactionSignatureCreator` can now operate directly with the `CMutableTransaction` without the need to copy the data into a `CTransaction`.

  Running all unit tests brings a very noticable speedup on my machine:

      48.4 sec before this change
      36.4 sec with this change
      --------
      12.0 seconds saved

  running only `--run_test=transaction_tests/test_big_witness_transaction`:

      16.7 sec before this change
       5.9 sec with this change
      --------
      10.8 seconds saved

  This relates to my first attempt with the const_cast hack #13202, and to the slow unit test issue #10026.

  Also see #13050 which modifies the tests but not the production code (like this PR) to get a speedup.

Tree-SHA512: 2cff0e9699f484f26120a40e431a24c8bc8f9e780fd89cb0ecf20c5be3eab6c43f9c359cde244abd9f3620d06c7c354e3b9dd3da41fa2ca1ac1e09386fea25fb
2018-05-31 10:40:11 +02:00
..
bitcoinconsensus.cpp Support deserializing into temporaries 2018-03-13 17:04:31 -07:00
bitcoinconsensus.h Fix missing or inconsistent include guards 2018-03-22 16:23:04 +01:00
interpreter.cpp Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction 2018-05-30 16:01:36 +02:00
interpreter.h Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction 2018-05-30 16:01:36 +02:00
ismine.cpp Make handling of invalid in IsMine more uniform 2018-05-24 10:29:02 -07:00
ismine.h Make IsMine stop distinguishing solvable/unsolvable 2018-05-03 11:02:01 -07:00
script.cpp Remove template matching and pseudo opcodes 2018-05-29 14:40:18 -07:00
script.h Remove template matching and pseudo opcodes 2018-05-29 14:40:18 -07:00
script_error.cpp Add constant scriptCode policy in non-segwit scripts 2018-05-05 04:26:12 +08:00
script_error.h Add constant scriptCode policy in non-segwit scripts 2018-05-05 04:26:12 +08:00
sigcache.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
sigcache.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
sign.cpp Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction 2018-05-30 16:01:36 +02:00
sign.h Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction 2018-05-30 16:01:36 +02:00
standard.cpp Remove template matching and pseudo opcodes 2018-05-29 14:40:18 -07:00
standard.h Make CScript -> CScriptID conversion explicit 2018-04-18 17:08:50 -07:00