bitcoinj-cash / bitcoinj

A library for working with Bitcoin
http://bitcoinj.cash
Apache License 2.0
64 stars 35 forks source link

make the default tx a BCH tx #59

Closed Danconnolly closed 6 years ago

Danconnolly commented 6 years ago

Updates Transaction class so that every new transaction is by default a BCH transaction.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 76.905% when pulling ce724653c58f4697be9052f071ad6d786724e32a on Danconnolly:deftxbch into f8405faeef2501d3a01d71473a89ea40d53ba2aa on bitcoinj-cash:cash-0.14.

HashEngineering commented 6 years ago

This is an important update. It would eliminate these issues: #56, #4 for new users and developers.

What I am not sure about is if version 2 transactions alone trigger signing inputs properly for BCH.

Will this replace the SendRequest.setForkId requirement?

Danconnolly commented 6 years ago

You're right, version 2 is not quite the right thing. This needs more research, closing for now.

HashEngineering commented 6 years ago

We can make version > 2 transactions trigger SendRequest.setForkId(true). Right now it is the other way around.

HashEngineering commented 6 years ago

Or perhaps we have SendRequest.setForkId(true) by default and then modify the tests that fail to use SendRequest.setForkId(false).