Skip to content

Segwit implementation#26

Open
oleganza wants to merge 2 commits into
masterfrom
segwit
Open

Segwit implementation#26
oleganza wants to merge 2 commits into
masterfrom
segwit

Conversation

@oleganza

@oleganza oleganza commented Jan 2, 2018

Copy link
Copy Markdown
Owner

Initial work done by @mgpnd in #25, this is a refactoring follow-up.

@oleganza

oleganza commented Jan 2, 2018

Copy link
Copy Markdown
Owner Author

From #25 (comment):

  1. You can use BTC.hash256() instead of BTC.sha256(BTC.sha256()).
  2. New signature_hash function uses dup on the transaction. But current version of dup does not duplicate witness field. This is not a bug for sighash, but should be addressed as soon as a subclass is introduced. (That is, lets not forget the new field txin.witness.)
  3. I'd recommend not creating a subclass at all. I'd rather extend BTC::Transaction with segwit serialization and sighash options, in the same way BTC::TransactionInput simply adds witness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants