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 204 additions and 8 deletions
Showing only changes of commit 6d4615ce31 - Show all commits

View file

@ -594,10 +594,10 @@ class PendingActivationValue(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 PendingActivationKey struct { type PendingActivationKey struct {
Prefix []byte `json:"prefix"` Prefix []byte `json:"prefix"`
Height int32 `json:"height"` Height uint32 `json:"height"`
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.
TxoType int32 `json:"txo_height"` TxoType uint8 `json:"txo_type"`
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.
TxNum int32 `json:"tx_num"` 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.
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"` 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.
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 (k *PendingActivationKey) IsSupport() bool { func (k *PendingActivationKey) IsSupport() bool {
@ -613,6 +613,102 @@ type PendingActivationValue 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"` NormalizedName string `json:"normalized_name"`
} }
func (k *PendingActivationKey) 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'>LBLH'
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 + 1 + 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.Height)
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[prefixLen+4] = k.TxoType
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+5:], 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+9:], 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 *PendingActivationValue) 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[: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.
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 PendingActivationKeyPackPartialNFields(nFields int) func(*PendingActivationKey) []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 *PendingActivationKey) []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 PendingActivationKeyPackPartial(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 PendingActivationKeyPackPartial(k *PendingActivationKey, 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 > 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.
nFields = 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.
}
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 += 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.
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 += 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 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.
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.Height)
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.
key[prefixLen+4] = k.TxoType
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.PutUint32(key[prefixLen+5:], 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 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.
binary.BigEndian.PutUint16(key[prefixLen+9:], 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 PendingActivationKeyUnpack(key []byte) *PendingActivationKey {
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 &PendingActivationKey{
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.
Height: 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.
TxoType: 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.
TxNum: binary.BigEndian.Uint32(key[prefixLen+5:]),
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+9:]),
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 PendingActivationValueUnpack(value []byte) *PendingActivationValue {
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 &PendingActivationValue{
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 ActivationKey(typing.NamedTuple): class ActivationKey(typing.NamedTuple):
txo_type: int txo_type: int
@ -1612,8 +1708,9 @@ 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 ClaimExpiration: case ClaimExpiration:
case ClaimTakeover: case ClaimTakeover:
case PendingActivation:
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 0x0, nil, errors.Base("key unpack function for %v not implemented", firstByte) return 0x0, nil, errors.Base("key unpack function for %v not implemented", firstByte)
case PendingActivation:
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 PendingActivation, PendingActivationKeyUnpack(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 ActivatedClaimAndSupport: case ActivatedClaimAndSupport:
return ActivatedClaimAndSupport, ActivationKeyUnpack(key), nil return ActivatedClaimAndSupport, ActivationKeyUnpack(key), nil
case ActiveAmount: case ActiveAmount:
@ -1675,8 +1772,9 @@ 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 ClaimExpiration: case ClaimExpiration:
case ClaimTakeover: case ClaimTakeover:
case PendingActivation:
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 0x0, nil, errors.Base("value unpack not implemented for key %v", key) return 0x0, nil, errors.Base("value unpack not implemented for key %v", key)
case PendingActivation:
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 PendingActivation, PendingActivationValueUnpack(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 ActivatedClaimAndSupport: case ActivatedClaimAndSupport:
return ActivatedClaimAndSupport, ActivationValueUnpack(value), nil return ActivatedClaimAndSupport, ActivationValueUnpack(value), nil
case ActiveAmount: case ActiveAmount:

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,94 @@ func testInit(filePath string) (*grocksdb.DB, [][]string, func()) {
return db, records, toDefer return db, records, toDefer
} }
func TestPendingActivation(t *testing.T) {
filePath := "../../resources/pending_activation.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.PendingActivation}).WithIncludeValue(true)
ch := dbpkg.Iter(db, options)
var i = 0
for kv := range ch {
// log.Println(kv.Key)
gotKey := kv.Key.(*prefixes.PendingActivationKey).PackKey()
keyPartial1 := prefixes.PendingActivationKeyPackPartial(kv.Key.(*prefixes.PendingActivationKey), 1)
keyPartial2 := prefixes.PendingActivationKeyPackPartial(kv.Key.(*prefixes.PendingActivationKey), 2)
keyPartial3 := prefixes.PendingActivationKeyPackPartial(kv.Key.(*prefixes.PendingActivationKey), 3)
keyPartial4 := prefixes.PendingActivationKeyPackPartial(kv.Key.(*prefixes.PendingActivationKey), 4)
// 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)
}
if !bytes.HasPrefix(gotKey, keyPartial4) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial4, gotKey)
}
got := kv.Value.(*prefixes.PendingActivationValue).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.PendingActivationValue).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 TestActivated(t *testing.T) { func TestActivated(t *testing.T) {
filePath := "../../resources/activated_claim_and_support.csv" filePath := "../../resources/activated_claim_and_support.csv"

View file

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

View file

@ -0,0 +1,10 @@
5100002e5002000059610000,04c7d5e2360f10ab8e28d5d831abb29b72cea3a8000c697473616469736173746572
5100002e52020000596d0000,04c7d5e2360f10ab8e28d5d831abb29b72cea3a8000c697473616469736173746572
5100005d570200025e360000,32d4fc78396c239f5c1a0a041242eebb2636750900036f6e65
5100005d590200025e570001,c923ae766c269535048c06674261e546004375ab000374776f
5100005d5a0200025e6a0001,c923ae766c269535048c06674261e546004375ab000374776f
51000061e50200029e100000,a467b70b0a9ddba924d0a115206fe7c1cb25a3460003707567
51000080a002000449380000,c6ddef5e005606bd816177c7f0cba2404c7191310006757465737432
510000c3c102000864bb0000,32d4fc78396c239f5c1a0a041242eebb2636750900036f6e65
510000fd8002000c380b0000,c2ba0ad053f45d77ae569a1b5c407bc213365fda00037a6564
510001556c02001030b40000,467513d3a6eed0114964d751cd85ed49c8e3af4e000b776172616e647065616365
1 5100002e5002000059610000 04c7d5e2360f10ab8e28d5d831abb29b72cea3a8000c697473616469736173746572
2 5100002e52020000596d0000 04c7d5e2360f10ab8e28d5d831abb29b72cea3a8000c697473616469736173746572
3 5100005d570200025e360000 32d4fc78396c239f5c1a0a041242eebb2636750900036f6e65
4 5100005d590200025e570001 c923ae766c269535048c06674261e546004375ab000374776f
5 5100005d5a0200025e6a0001 c923ae766c269535048c06674261e546004375ab000374776f
6 51000061e50200029e100000 a467b70b0a9ddba924d0a115206fe7c1cb25a3460003707567
7 51000080a002000449380000 c6ddef5e005606bd816177c7f0cba2404c7191310006757465737432
8 510000c3c102000864bb0000 32d4fc78396c239f5c1a0a041242eebb2636750900036f6e65
9 510000fd8002000c380b0000 c2ba0ad053f45d77ae569a1b5c407bc213365fda00037a6564
10 510001556c02001030b40000 467513d3a6eed0114964d751cd85ed49c8e3af4e000b776172616e647065616365