Skip to content

Conversation

jtimon
Copy link
Contributor

@jtimon jtimon commented Sep 27, 2014

Is built on top of #4890.
May interfere with #4981.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 27, 2014

This could continue with https://github.com/jtimon/bitcoin/tree/sighash2 and https://github.com/jtimon/bitcoin/tree/sighash3 or simply https://github.com/jtimon/bitcoin/tree/sighash_abstract. With an abstract class the libscript could use a minimal duplicated version of CTransaction if we decide to do that, probably only temporarily, until core is more divided (again, if we decide that including the whole core.o in libscript is too much right now).

#include <vector>
#include <stdint.h>
#include <string>

class uint256;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This should stay at the end.

@Diapolo
Copy link

Diapolo commented Sep 27, 2014

May I suggest changing the copyright (in the files header) of edited files directly to be just MIT :)?

@jtimon
Copy link
Contributor Author

jtimon commented Sep 27, 2014

I think all nits belong to #4890 but I will happily rebase on top of a corrected version.

@jtimon jtimon force-pushed the sighash branch 2 times, most recently from 6312eef to 7ffba23 Compare September 29, 2014 23:39
@jtimon
Copy link
Contributor Author

jtimon commented Sep 29, 2014

Mhmm, @theuni one of the tests builds didn't failed when it had to https://travis-ci.org/bitcoin/bitcoin/builds/36618762

@sipa
Copy link
Member

sipa commented Sep 29, 2014

It failed to compile...

@jtimon
Copy link
Contributor Author

jtimon commented Sep 29, 2014

@sipa, I know and I fixed that, but the travis builds should had all failed due to the compiling error, but build 5/7 didn't failed. So maybe there's something wrong with it, I don't know.

@sipa
Copy link
Member

sipa commented Sep 29, 2014

@jtimon Sorry, I misread your comment. Seems we don't compile the unit tests for OSX. @theuni?

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4989_7ffba2382622ec9529cdd318cc12bc50ebf5b0b3/ for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

@theuni
Copy link
Member

theuni commented Sep 30, 2014

Yes, OSX doesn't build the tests because they can't run there (it's a cross build from Linux). I figured we had enough builders handling the tests, so instead the OSX spends its time testing the dmg packing process.

I'd be fine with switching the tests on so that they build if you guys would prefer that, but I'm not sure it would do much for us.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 30, 2014

It's fine, I thought you may not be aware of this or something. Thanks for the explanation.

@theuni
Copy link
Member

theuni commented Sep 30, 2014

@jtimon Thanks, you were right to point it out. The tests were created somewhat arbitrarily, I assumed they would be ever-evolving. If you think something needs more coverage, by all means mention it :)

@jtimon
Copy link
Contributor Author

jtimon commented Oct 7, 2014

Here's another version of this PR built on top of #5054 : https://github.com/jtimon/bitcoin/tree/sighash_explicit

@jtimon jtimon changed the title Replace SignatureHash() with class SignatureHasher Replace SignatureHash() with class TxSignatureHasher Oct 7, 2014
@jtimon
Copy link
Contributor Author

jtimon commented Oct 7, 2014

Changed the class name from SignatureHasher to TxSignatureHasher
Also rebased on top of #4981 since that will probably be merged first.

@jtimon
Copy link
Contributor Author

jtimon commented Oct 8, 2014

Went back to being independent from #4981 since the rebase is straight forward anyway. Now the original SignatureHash function is maintained but renamed and moved to the anonymous namespace.

@jtimon
Copy link
Contributor Author

jtimon commented Oct 9, 2014

Always instantiate a new CTransaction in TxSignatureHasher's constructor and not only when a CMutableTransaction is provided as suggested by @laanwj.

@jtimon
Copy link
Contributor Author

jtimon commented Oct 29, 2014

Closing until at least 0.10

@jtimon jtimon closed this Oct 29, 2014
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants