shachain: revocation hashes are now hash160's
This commit is contained in:
parent
20e367c4e7
commit
f49da92a4e
@ -9,7 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/btcsuite/btcd/wire"
|
"github.com/btcsuite/btcd/wire"
|
||||||
"github.com/btcsuite/fastsha256"
|
"github.com/btcsuite/btcutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -153,10 +153,10 @@ func (h *HyperShaChain) CurrentPreImage() *wire.ShaHash {
|
|||||||
|
|
||||||
// CurrentRevocationHash...
|
// CurrentRevocationHash...
|
||||||
// TODO(roasbeef): *wire.ShaHash vs [wire.HashSize]byte ?
|
// TODO(roasbeef): *wire.ShaHash vs [wire.HashSize]byte ?
|
||||||
func (h *HyperShaChain) CurrentRevocationHash() [wire.HashSize]byte {
|
func (h *HyperShaChain) CurrentRevocationHash() []byte {
|
||||||
h.RLock()
|
h.RLock()
|
||||||
defer h.RUnlock()
|
defer h.RUnlock()
|
||||||
return fastsha256.Sum256(h.lastHash[:])
|
return btcutil.Hash160(h.lastHash[:])
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocatePreImage...
|
// LocatePreImage...
|
||||||
|
Loading…
Reference in New Issue
Block a user