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 195 additions and 8 deletions
Showing only changes of commit 3402eceb8e - Show all commits

View file

@ -632,17 +632,108 @@ class ActivationValue(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 ActivationKey struct {
Prefix []byte `json:"prefix"`
TxType int32 `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.
TxNum int32 `json:"txo_num"`
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
}
type ActivationValue struct {
Height int32 `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.
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.
ClaimHash []byte `json:"claim_hash"`
NormalizedName string `json:"normalized_name"`
}
func (k *ActivationKey) 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'>BLH'
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 + 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.
copy(key[prefixLen:], []byte{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+1:], 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+5:], 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 *ActivationValue) 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 := 4 + 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.
binary.BigEndian.PutUint32(value, v.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.
copy(value[4:], 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[24:], 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[26:], []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 ActivationKeyPackPartialNFields(nFields int) func(*ActivationKey) []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 *ActivationKey) []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 ActivationKeyPackPartial(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 ActivationKeyPackPartial(k *ActivationKey, nFields int) []byte {
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
binary.BigEndian.PutUint16(key[prefixLen+5:], 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 ActivationKeyUnpack(key []byte) *ActivationKey {
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 &ActivationKey{
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.
TxoType: key[prefixLen],
lyoshenka commented 2022-03-24 19:47:15 +01:00 (Migrated from github.com)
Review

why snake case here?

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

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

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

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

i suggest using lbcd types as much as possible where it makes sense. if something is a Hash, make it a Hash. if its an Address, make it an Address.
TxNum: binary.BigEndian.Uint32(key[prefixLen+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.
Position: binary.BigEndian.Uint16(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.
}
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 ActivationValueUnpack(value []byte) *ActivationValue {
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[24:])
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 &ActivationValue{
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(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.
ClaimHash: value[4 : 20+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.
NormalizedName: string(value[26 : 26+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 ActiveAmountKey(typing.NamedTuple):
@ -1522,8 +1613,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 ClaimTakeover:
case PendingActivation:
case ActivatedClaimAndSupport:
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)
case ActivatedClaimAndSupport:
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 ActivatedClaimAndSupport, ActivationKeyUnpack(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 ActiveAmount:
return ActiveAmount, ActiveAmountKeyUnpack(key), nil
@ -1584,8 +1676,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 ClaimTakeover:
case PendingActivation:
case ActivatedClaimAndSupport:
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)
case ActivatedClaimAndSupport:
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 ActivatedClaimAndSupport, ActivationValueUnpack(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 ActiveAmount:
return ActiveAmount, ActiveAmountValueUnpack(value), nil

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

why snake case here?

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

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

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

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

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

why snake case here?

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

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

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

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

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

View file

@ -44,6 +44,90 @@ func testInit(filePath string) (*grocksdb.DB, [][]string, func()) {
return db, records, toDefer
}
func TestActivated(t *testing.T) {
filePath := "../../resources/activated_claim_and_support.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.ActivatedClaimAndSupport}).WithIncludeValue(true)
ch := dbpkg.Iter(db, options)
var i = 0
for kv := range ch {
// log.Println(kv.Key)
gotKey := kv.Key.(*prefixes.ActivationKey).PackKey()
keyPartial1 := prefixes.ActivationKeyPackPartial(kv.Key.(*prefixes.ActivationKey), 1)
keyPartial2 := prefixes.ActivationKeyPackPartial(kv.Key.(*prefixes.ActivationKey), 2)
keyPartial3 := prefixes.ActivationKeyPackPartial(kv.Key.(*prefixes.ActivationKey), 3)
// Check pack partial for sanity
if !bytes.HasPrefix(gotKey, keyPartial1) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial1, gotKey)
}
if !bytes.HasPrefix(gotKey, keyPartial2) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial2, gotKey)
}
if !bytes.HasPrefix(gotKey, keyPartial3) {
t.Errorf("%+v should be prefix of %+v\n", keyPartial3, gotKey)
}
got := kv.Value.(*prefixes.ActivationValue).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.ActivationValue).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 TestActiveAmount(t *testing.T) {
filePath := "../../resources/active_amount.csv"

View file

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

View file

@ -0,0 +1,10 @@
520100162aa70000,00021b3dc78ac4c326cd43cdc0c844b7cea13659449ab3e40015746573742d70686f746f2d7374726173626f757267
520100162f600000,00021c27ebf95f7fdb89db5467bb1b88ea3b0f0f7ee5ce360003636e63
5201001630960000,00021c63a6f91a86837ab84a4cf0d2dcbe94704a528cf820000f776f6e646572776f6d616e31393933
5201001635e60000,00021d689673cc2a1aac64d7b2742705abfb09fca30d7e0500056d6d61736b
5201001638a80000,00021f4bc39342066646dc50f1a9954b41684d157b035dac00036f6e65
5201001645ef0001,000220144689c1ccb4420309f93ab98799b28c49fa4d3809000a65617379737472656574
52010016529a0000,0002225ff1628d66ae52295590b72b9a0b3a3527642a532600137465737470756230332d32312d323031372d32
52010016529d0000,00022261a4c61ced261ab571bdb3410ae140bec6c31f14ce00117465737470756230332d32312d32303137
5201001655960000,000222f42327bcb6d7578a2669e416b5aa185fe14ee8e03e00056569676874
5201001664200000,00022584f69099600bdca9b062ba60432dba3c0ca2241167002c686973746f72792d6f662d6672696564726963682d69692d6f662d707275737369612d766f6c756d652d3137
1 520100162aa70000 00021b3dc78ac4c326cd43cdc0c844b7cea13659449ab3e40015746573742d70686f746f2d7374726173626f757267
2 520100162f600000 00021c27ebf95f7fdb89db5467bb1b88ea3b0f0f7ee5ce360003636e63
3 5201001630960000 00021c63a6f91a86837ab84a4cf0d2dcbe94704a528cf820000f776f6e646572776f6d616e31393933
4 5201001635e60000 00021d689673cc2a1aac64d7b2742705abfb09fca30d7e0500056d6d61736b
5 5201001638a80000 00021f4bc39342066646dc50f1a9954b41684d157b035dac00036f6e65
6 5201001645ef0001 000220144689c1ccb4420309f93ab98799b28c49fa4d3809000a65617379737472656574
7 52010016529a0000 0002225ff1628d66ae52295590b72b9a0b3a3527642a532600137465737470756230332d32312d323031372d32
8 52010016529d0000 00022261a4c61ced261ab571bdb3410ae140bec6c31f14ce00117465737470756230332d32312d32303137
9 5201001655960000 000222f42327bcb6d7578a2669e416b5aa185fe14ee8e03e00056569676874
10 5201001664200000 00022584f69099600bdca9b062ba60432dba3c0ca2241167002c686973746f72792d6f662d6672696564726963682d69692d6f662d707275737369612d766f6c756d652d3137