From 07984836e4aa9c3b6ef35c8dcf5034751e2db109 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 16 Dec 2015 14:39:05 -0600 Subject: [PATCH] Create skeleton for revocation methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Just rusty’s shachain for now --- revocation/revocation.go | 10 ++++++++++ .../shachain/hash_chain.go => revocation/shachain.go | 6 ++---- revocation/shachain_test.go | 1 + wallet/shachain/hash_chain_test.go | 1 - 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 revocation/revocation.go rename wallet/shachain/hash_chain.go => revocation/shachain.go (77%) create mode 100644 revocation/shachain_test.go delete mode 100644 wallet/shachain/hash_chain_test.go diff --git a/revocation/revocation.go b/revocation/revocation.go new file mode 100644 index 00000000..df1c544f --- /dev/null +++ b/revocation/revocation.go @@ -0,0 +1,10 @@ +package revocation + +// TODO(roasbeef): +// * fin..later +// * reg HD Chain +// * Codeshark's sub-branch proposal +// * Rusty's hypercube shachain +// * more...idk? +type VerifiableRevocation interface { +} diff --git a/wallet/shachain/hash_chain.go b/revocation/shachain.go similarity index 77% rename from wallet/shachain/hash_chain.go rename to revocation/shachain.go index 4c3a8e52..ba6ee6a7 100644 --- a/wallet/shachain/hash_chain.go +++ b/revocation/shachain.go @@ -1,10 +1,7 @@ -package wallet +package revocation import "github.com/btcsuite/btcd/wire" -// TODO(roasbeef): port Rusty's hash-chain stuff -// * or just use HD chains based off of CodeShark's proposal? - // chainFragment... type chainFragment struct { index uint64 @@ -21,6 +18,7 @@ type ShaChain struct { // NewShaChain... func NewShaChain(seed wire.ShaHash) *ShaChain { // TODO(roasbeef): from/to or static size? + return nil } // NextHash... diff --git a/revocation/shachain_test.go b/revocation/shachain_test.go new file mode 100644 index 00000000..e66dd379 --- /dev/null +++ b/revocation/shachain_test.go @@ -0,0 +1 @@ +package revocation diff --git a/wallet/shachain/hash_chain_test.go b/wallet/shachain/hash_chain_test.go deleted file mode 100644 index 23a75073..00000000 --- a/wallet/shachain/hash_chain_test.go +++ /dev/null @@ -1 +0,0 @@ -package wallet