channeldb: revocation hashes are 20 bytes

* Although, why not 32?
This commit is contained in:
Olaoluwa Osuntokun 2015-12-31 00:28:00 -06:00
parent 0d4c78e90d
commit c4af4017da
2 changed files with 7 additions and 2 deletions

View File

@ -78,7 +78,7 @@ type OpenChannel struct {
// Current revocation for their commitment transaction. However, since
// this is the hash, and not the pre-image, we can't yet verify that
// it's actually in the chain.
TheirCurrentRevocation [wire.HashSize]byte
TheirCurrentRevocation [20]byte
TheirShaChain *shachain.HyperShaChain
OurShaChain *shachain.HyperShaChain

View File

@ -31,6 +31,11 @@ var (
0x2d, 0xe7, 0x93, 0xe4, 0xb7, 0x25, 0xb8, 0x4d,
0x1f, 0xb, 0x4c, 0xf9, 0x9e, 0xc5, 0x8c, 0xe9,
}
rev = [20]byte{
0x51, 0xb6, 0x37, 0xd8, 0xfc, 0xd2, 0xc6, 0xda,
0x48, 0x59, 0xe6, 0x96, 0x31, 0x13, 0xa1, 0x17,
0x2d, 0xe7, 0x93, 0xe4,
}
testTx = &wire.MsgTx{
Version: 1,
TxIn: []*wire.TxIn{
@ -146,7 +151,7 @@ func TestOpenChannelEncodeDecode(t *testing.T) {
FundingTx: testTx,
MultiSigKey: privKey,
FundingRedeemScript: script,
TheirCurrentRevocation: id,
TheirCurrentRevocation: rev,
OurDeliveryAddress: addr,
TheirDeliveryAddress: addr,
CsvDelay: 5,