lnwallet: payment and revocation hashes are now 32 bytes

This unifies some inconstancies across the code-base with hashes being
32 vs 20 bytes. All hashes, whether payment or revocation are now
uniformly 32 bytes everywhere. As a result, only OP_SHA256 will be used
within commitment and HTLC scripts. The rationale for using sha256
instead of hash160 for the HTLC payment pre-image is that alternative
chains are more likely to have sha256 implemented, rather than
ripemd160.

A forthcoming commit will update the current commitment, and HTLC
scripts.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-06-26 23:04:14 -07:00
1 parent 1a48db3039
commit 05fb9b5a6d
3 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ type ChannelContribution struct {
// Hash to be used as the revocation for the initial version of this
// party's commitment transaction.
RevocationHash [20]byte
RevocationHash [32]byte
// The delay (in blocks) to be used for the pay-to-self output in this
// party's version of the commitment transaction.