rocksdb #29

Merged
jeffreypicard merged 93 commits from feature/27/jeffreypicard/rocksdb into master 2022-04-29 17:04:01 +02:00
4 changed files with 191 additions and 7 deletions
Showing only changes of commit 207ebd5608 - Show all commits

View file

@ -525,9 +525,9 @@ class ClaimExpirationValue(typing.NamedTuple):
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
type ClaimExpirationKey struct {
Prefix []byte `json:"prefix"`
Expiration int32 `json:"expiration"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
TxNum int32 `json:"tx_num"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Position int32 `json:"position"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Expiration uint32 `json:"expiration"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
TxNum uint32 `json:"tx_num"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Position uint16 `json:"position"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
type ClaimExpirationValue struct {
@ -535,6 +535,96 @@ type ClaimExpirationValue struct {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
NormalizedName string `json:"normalized_name"`
}
func (k *ClaimExpirationKey) PackKey() []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
prefixLen := 1
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
// b'>LLH'
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
n := prefixLen + 4 + 4 + 2
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
key := make([]byte, n)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
copy(key, k.Prefix)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint32(key[prefixLen:], k.Expiration)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint32(key[prefixLen+4:], k.TxNum)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint16(key[prefixLen+8:], k.Position)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return key
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
func (v *ClaimExpirationValue) PackValue() []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
nameLen := len(v.NormalizedName)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
n := 20 + 2 + nameLen
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
value := make([]byte, n)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
copy(value, v.ClaimHash)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint16(value[20:], uint16(nameLen))
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
copy(value[22:], []byte(v.NormalizedName))
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return value
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
func ClaimExpirationKeyPackPartialNFields(nFields int) func(*ClaimExpirationKey) []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return func(u *ClaimExpirationKey) []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return ClaimExpirationKeyPackPartial(u, nFields)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
func ClaimExpirationKeyPackPartial(k *ClaimExpirationKey, nFields int) []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
// Limit nFields between 0 and number of fields, we always at least need
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
// the prefix, and we never need to iterate past the number of fields.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
if nFields > 3 {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
nFields = 3
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
if nFields < 0 {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
nFields = 0
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
// b'>4sLH'
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
prefixLen := 1
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
var n = prefixLen
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
for i := 0; i <= nFields; i++ {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
switch i {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 1:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
n += 4
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 2:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
n += 4
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 3:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
n += 2
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
key := make([]byte, n)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
for i := 0; i <= nFields; i++ {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
switch i {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 0:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
copy(key, k.Prefix)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 1:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint32(key[prefixLen:], k.Expiration)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 2:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint32(key[prefixLen+4:], k.TxNum)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case 3:
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint16(key[prefixLen+8:], k.Position)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return key
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
func ClaimExpirationKeyUnpack(key []byte) *ClaimExpirationKey {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
prefixLen := 1
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return &ClaimExpirationKey{
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Prefix: key[:prefixLen],
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Expiration: binary.BigEndian.Uint32(key[prefixLen:]),
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
TxNum: binary.BigEndian.Uint32(key[prefixLen+4:]),
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
Position: binary.BigEndian.Uint16(key[prefixLen+8:]),
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
func ClaimExpirationValueUnpack(value []byte) *ClaimExpirationValue {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
nameLen := binary.BigEndian.Uint16(value[20:])
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return &ClaimExpirationValue{
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
ClaimHash: value[:20],
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
NormalizedName: string(value[22 : 22+nameLen]),
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
/*
class ClaimTakeoverKey(typing.NamedTuple):
normalized_name: str
@ -1784,7 +1874,7 @@ func UnpackGenericKey(key []byte) (byte, interface{}, error) {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case EffectiveAmount:
return EffectiveAmount, EffectiveAmountKeyUnpack(key), nil
case ClaimExpiration:
return 0x0, nil, errors.Base("key unpack function for %v not implemented", firstByte)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return ClaimExpiration, ClaimExpirationKeyUnpack(key), nil
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case ClaimTakeover:
return ClaimTakeover, ClaimTakeoverKeyUnpack(key), nil
@ -1849,7 +1939,7 @@ func UnpackGenericValue(key, value []byte) (byte, interface{}, error) {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case EffectiveAmount:
return EffectiveAmount, EffectiveAmountValueUnpack(value), nil
case ClaimExpiration:
return 0x0, nil, errors.Base("value unpack not implemented for key %v", key)
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
return ClaimExpiration, ClaimExpirationValueUnpack(value), nil
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
case ClaimTakeover:
return ClaimTakeover, ClaimTakeoverValueUnpack(value), nil

lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

why snake case here?
lyoshenka commented 2022-03-24 19:50:57 +01:00 (Migrated from github.com)
Review

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25

if this is a fixed size, should it be an array? or even a chainhash.Hash? https://github.com/lbryio/lbcd/blob/master/chaincfg/chainhash/hash.go#L25
lyoshenka commented 2022-03-24 19:51:47 +01:00 (Migrated from github.com)
Review

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.

View file

@ -44,6 +44,90 @@ func testInit(filePath string) (*grocksdb.DB, [][]string, func()) {
return db, records, toDefer
}
func TestClaimExpiration(t *testing.T) {
filePath := "../../resources/claim_expiration.csv"
wOpts := grocksdb.NewDefaultWriteOptions()
db, records, toDefer := testInit(filePath)
defer toDefer()
for _, record := range records {
key, err := hex.DecodeString(record[0])
if err != nil {
log.Println(err)
}
val, err := hex.DecodeString(record[1])
if err != nil {
log.Println(err)
}
db.Put(wOpts, key, val)
}
// test prefix
options := dbpkg.NewIterateOptions().WithPrefix([]byte{prefixes.ClaimExpiration}).WithIncludeValue(true)
ch := dbpkg.Iter(db, options)
var i = 0
for kv := range ch {
// log.Println(kv.Key)
gotKey := kv.Key.(*prefixes.ClaimExpirationKey).PackKey()
keyPartial1 := prefixes.ClaimExpirationKeyPackPartial(kv.Key.(*prefixes.ClaimExpirationKey), 1)
keyPartial2 := prefixes.ClaimExpirationKeyPackPartial(kv.Key.(*prefixes.ClaimExpirationKey), 2)
keyPartial3 := prefixes.ClaimExpirationKeyPackPartial(kv.Key.(*prefixes.ClaimExpirationKey), 3)
// Check pack partial for sanity
if !bytes.HasPrefix(gotKey, keyPartial1) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial1, gotKey)
}
if !bytes.HasPrefix(gotKey, keyPartial2) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial2, gotKey)
}
if !bytes.HasPrefix(gotKey, keyPartial3) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial3, gotKey)
}
got := kv.Value.(*prefixes.ClaimExpirationValue).PackValue()
wantKey, err := hex.DecodeString(records[i][0])
if err != nil {
log.Println(err)
}
want, err := hex.DecodeString(records[i][1])
if err != nil {
log.Println(err)
}
if !bytes.Equal(gotKey, wantKey) {
t.Errorf("gotKey: %+v, wantKey: %+v\n", got, want)
}
if !bytes.Equal(got, want) {
t.Errorf("got: %+v, want: %+v\n", got, want)
}
i++
}
// Test start / stop
start, err := hex.DecodeString(records[0][0])
if err != nil {
log.Println(err)
}
stop, err := hex.DecodeString(records[9][0])
if err != nil {
log.Println(err)
}
options2 := dbpkg.NewIterateOptions().WithStart(start).WithStop(stop).WithIncludeValue(true)
ch2 := dbpkg.Iter(db, options2)
i = 0
for kv := range ch2 {
got := kv.Value.(*prefixes.ClaimExpirationValue).PackValue()
want, err := hex.DecodeString(records[i][1])
if err != nil {
log.Println(err)
}
if !bytes.Equal(got, want) {
t.Errorf("got: %+v, want: %+v\n", got, want)
}
i++
}
}
func TestClaimTakeover(t *testing.T) {
filePath := "../../resources/claim_takeover.csv"

View file

@ -38,7 +38,7 @@ func main() {
options := &db.IterOptions{
FillCache: false,
Prefix: []byte{prefixes.ClaimTakeover},
Prefix: []byte{prefixes.ClaimExpiration},
Start: nil,
Stop: nil,
IncludeStart: true,
@ -49,7 +49,7 @@ func main() {
RawValue: true,
}
db.ReadWriteRawN(dbVal, options, "./resources/claim_takeover.csv", 10)
db.ReadWriteRawN(dbVal, options, "./resources/claim_expiration.csv", 10)
return
}

View file

@ -0,0 +1,10 @@
4f00222fbd00162aa70000,c78ac4c326cd43cdc0c844b7cea13659449ab3e40015746573742d70686f746f2d7374726173626f757267
4f002230a700162f600000,ebf95f7fdb89db5467bb1b88ea3b0f0f7ee5ce360003636e63
4f002230e3001630960000,a6f91a86837ab84a4cf0d2dcbe94704a528cf820000f776f6e646572776f6d616e31393933
4f002231e8001635e60000,9673cc2a1aac64d7b2742705abfb09fca30d7e0500056d6d61736b
4f00223246001638a80000,c39342066646dc50f1a9954b41684d157b035dac00036f6e65
4f00223494001645ef0001,4689c1ccb4420309f93ab98799b28c49fa4d3809000a65617379737472656574
4f002236df0016529a0000,f1628d66ae52295590b72b9a0b3a3527642a532600137465737470756230332d32312d323031372d32
4f002236e10016529d0000,a4c61ced261ab571bdb3410ae140bec6c31f14ce00117465737470756230332d32312d32303137
4f00223774001655960000,2327bcb6d7578a2669e416b5aa185fe14ee8e03e00056569676874
4f00223a04001664200000,f69099600bdca9b062ba60432dba3c0ca2241167002c686973746f72792d6f662d6672696564726963682d69692d6f662d707275737369612d766f6c756d652d3137
1 4f00222fbd00162aa70000 c78ac4c326cd43cdc0c844b7cea13659449ab3e40015746573742d70686f746f2d7374726173626f757267
2 4f002230a700162f600000 ebf95f7fdb89db5467bb1b88ea3b0f0f7ee5ce360003636e63
3 4f002230e3001630960000 a6f91a86837ab84a4cf0d2dcbe94704a528cf820000f776f6e646572776f6d616e31393933
4 4f002231e8001635e60000 9673cc2a1aac64d7b2742705abfb09fca30d7e0500056d6d61736b
5 4f00223246001638a80000 c39342066646dc50f1a9954b41684d157b035dac00036f6e65
6 4f00223494001645ef0001 4689c1ccb4420309f93ab98799b28c49fa4d3809000a65617379737472656574
7 4f002236df0016529a0000 f1628d66ae52295590b72b9a0b3a3527642a532600137465737470756230332d32312d323031372d32
8 4f002236e10016529d0000 a4c61ced261ab571bdb3410ae140bec6c31f14ce00117465737470756230332d32312d32303137
9 4f00223774001655960000 2327bcb6d7578a2669e416b5aa185fe14ee8e03e00056569676874
10 4f00223a04001664200000 f69099600bdca9b062ba60432dba3c0ca2241167002c686973746f72792d6f662d6672696564726963682d69692d6f662d707275737369612d766f6c756d652d3137