lnd.xprv/revocation/shachain.go

38 lines
626 B
Go
Raw Normal View History

package revocation
2015-12-16 23:51:59 +03:00
import (
"sync"
"github.com/btcsuite/btcd/wire"
)
// chainFragment...
type chainFragment struct {
index uint64
hash wire.ShaHash
}
// HyperShaChain...
2015-12-16 23:49:01 +03:00
// * https://github.com/rustyrussell/ccan/blob/master/ccan/crypto/shachain/design.txt
type HyperShaChain struct {
2015-12-16 23:51:59 +03:00
sync.RWMutex
lastChainIndex uint64
chainFragments []chainFragment
}
// NewHyperShaChain...
func NewHyperShaChain(seed wire.ShaHash) *HyperShaChain {
// TODO(roasbeef): from/to or static size?
return nil
}
// NextHash...
func (s *HyperShaChain) NextHash() {
}
// GetHash...
func (s *HyperShaChain) GetHash(index uint64) {
}