rocksdb #29
35
db/db.go
|
@ -26,14 +26,14 @@ import (
|
|||
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
|
||||
const (
|
||||
// Blochchain height / expiration constants
|
||||
NOriginalClaimExpirationTime = 262974
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NExtendedClaimExpirationTime = 2102400
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NExtendedClaimExpirationForkHeight = 400155
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NNormalizedNameForkHeight = 539940 // targeting 21 March 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NMinTakeoverWorkaroundHeight = 496850
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NMaxTakeoverWorkaroundHeight = 658300 // targeting 30 Oct 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NWitnessForkHeight = 680770 // targeting 11 Dec 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NAllClaimsInMerkleForkHeight = 658310 // targeting 30 Oct 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
OriginalClaimExpirationTime = 262974
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
ExtendedClaimExpirationTime = 2102400
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
ExtendedClaimExpirationForkHeight = 400155
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
NormalizedNameForkHeight = 539940 // targeting 21 March 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
MinTakeoverWorkaroundHeight = 496850
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
MaxTakeoverWorkaroundHeight = 658300 // targeting 30 Oct 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
WitnessForkHeight = 680770 // targeting 11 Dec 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
AllClaimsInMerkleForkHeight = 658310 // targeting 30 Oct 2019
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
ProportionalDelayFactor = 32
|
||||
MaxTakeoverDelay = 4032
|
||||
// Initial size constants
|
||||
|
@ -440,7 +440,7 @@ func GetProdDB(name string, secondaryPath string) (*ReadOnlyDBColumnFamily, func
|
|||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
cfNames = append(cfNames, cfName)
|
||||
}
|
||||
|
||||
db, err := GetDBColumnFamlies(name, secondaryPath, cfNames)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
db, err := GetDBColumnFamilies(name, secondaryPath, cfNames)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
|
||||
cleanup := func() {
|
||||
db.DB.Close()
|
||||
|
@ -455,21 +455,10 @@ func GetProdDB(name string, secondaryPath string) (*ReadOnlyDBColumnFamily, func
|
|||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
return nil, cleanup, err
|
||||
}
|
||||
|
||||
// Wait for the height to be greater than zero
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// for {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// ReadDBState(db)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// if db.LastState.Height > 0 {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// logrus.Infof("db height is > 0: %+v\n", db.LastState)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// break
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// }
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// time.Sleep(time.Millisecond * 100)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// logrus.Infof("Waiting for db height to be > 0: %+v\n", db.LastState)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
// }
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
return db, cleanup, nil
|
||||
}
|
||||
|
||||
func GetDBColumnFamlies(name string, secondayPath string, cfNames []string) (*ReadOnlyDBColumnFamily, error) {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
func GetDBColumnFamilies(name string, secondayPath string, cfNames []string) (*ReadOnlyDBColumnFamily, error) {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
opts := grocksdb.NewDefaultOptions()
|
||||
roOpts := grocksdb.NewDefaultReadOptions()
|
||||
cfOpt := grocksdb.NewDefaultOptions()
|
||||
|
@ -591,7 +580,7 @@ func (db *ReadOnlyDBColumnFamily) RunDetectChanges(notifCh chan *internal.Height
|
|||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
log.Debug("DetectChanges:", db.LastState)
|
||||
lastPrint = time.Now()
|
||||
}
|
||||
err := db.DetectChanges(notifCh)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
err := db.detectChanges(notifCh)
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
if err != nil {
|
||||
log.Infof("Error detecting changes: %#v", err)
|
||||
}
|
||||
|
@ -606,7 +595,7 @@ func (db *ReadOnlyDBColumnFamily) RunDetectChanges(notifCh chan *internal.Height
|
|||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
}
|
||||
|
||||
// DetectChanges keep the rocksdb db in sync and handle reorgs
|
||||
func (db *ReadOnlyDBColumnFamily) DetectChanges(notifCh chan *internal.HeightHash) error {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
func (db *ReadOnlyDBColumnFamily) detectChanges(notifCh chan *internal.HeightHash) error {
|
||||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
||||
err := db.DB.TryCatchUpWithPrimary()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|||
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
![]() no need to start these with N no need to start these with N
![]() and many of these are unused and many of these are unused
![]() is this really no big deal? seems like an error to me but idk rocksdb is this really no big deal? seems like an error to me but idk rocksdb
![]() typo: Famlies -> Families typo: Famlies -> Families
![]() this can be unexported this can be unexported
![]() still need this? still need this?
![]() typo typo
![]() 👀 :eyes:
![]() I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation. I agree the "N" can go. I copied these all over from the Python. where I believe they are similarly unused, because I thought it might be the defacto documentation.
![]()
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this. ```
// Valid returns false only when an Iterator has iterated past either the
// first or the last key in the database.
func (iter *Iterator) Valid() bool {
return C.rocksdb_iter_valid(iter.c) != 0
}
```
If our iterator was to try to go off the end of the db, or the front if we're going backwards, we need to check this.
|
16
db/db_get.go
|
@ -17,12 +17,12 @@ func GetExpirationHeight(lastUpdatedHeight uint32) uint32 {
|
|||
|
||||
func GetExpirationHeightFull(lastUpdatedHeight uint32, extended bool) uint32 {
|
||||
if extended {
|
||||
return lastUpdatedHeight + NExtendedClaimExpirationTime
|
||||
return lastUpdatedHeight + ExtendedClaimExpirationTime
|
||||
}
|
||||
if lastUpdatedHeight < NExtendedClaimExpirationForkHeight {
|
||||
return lastUpdatedHeight + NOriginalClaimExpirationTime
|
||||
if lastUpdatedHeight < ExtendedClaimExpirationForkHeight {
|
||||
![]() unclear what the diff between this and previous function is. whats a full expiration height? unclear what the diff between this and previous function is. whats a full expiration height?
![]() That's just an internal distinction because it takes the optional boolean to use the extended expiration time. I added a comment. That's just an internal distinction because it takes the optional boolean to use the extended expiration time. I added a comment.
|
||||
return lastUpdatedHeight + OriginalClaimExpirationTime
|
||||
}
|
||||
return lastUpdatedHeight + NExtendedClaimExpirationTime
|
||||
return lastUpdatedHeight + ExtendedClaimExpirationTime
|
||||
}
|
||||
|
||||
// EnsureHandle is a helper function to ensure that the db has a handle to the given column family.
|
||||
|
@ -274,7 +274,7 @@ func (db *ReadOnlyDBColumnFamily) GetActiveAmount(claimHash []byte, txoType uint
|
|||
}
|
||||
|
||||
func (db *ReadOnlyDBColumnFamily) GetEffectiveAmount(claimHash []byte, supportOnly bool) (uint64, error) {
|
||||
supportAmount, err := db.GetActiveAmount(claimHash, prefixes.ACTIVATED_SUPPORT_TXO_TYPE, db.Height+1)
|
||||
supportAmount, err := db.GetActiveAmount(claimHash, prefixes.ActivatedSupportTXOType, db.Height+1)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ func (db *ReadOnlyDBColumnFamily) GetEffectiveAmount(claimHash []byte, supportOn
|
|||
return supportAmount, nil
|
||||
}
|
||||
|
||||
activationAmount, err := db.GetActiveAmount(claimHash, prefixes.ACTIVATED_CLAIM_TXO_TYPE, db.Height+1)
|
||||
activationAmount, err := db.GetActiveAmount(claimHash, prefixes.ActivateClaimTXOType, db.Height+1)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -347,9 +347,9 @@ func (db *ReadOnlyDBColumnFamily) GetActivationFull(txNum uint32, postition uint
|
|||
}
|
||||
|
||||
if isSupport {
|
||||
typ = prefixes.ACTIVATED_SUPPORT_TXO_TYPE
|
||||
typ = prefixes.ActivatedSupportTXOType
|
||||
} else {
|
||||
typ = prefixes.ACTIVATED_CLAIM_TXO_TYPE
|
||||
typ = prefixes.ActivateClaimTXOType
|
||||
}
|
||||
|
||||
key := prefixes.NewActivationKey(typ, txNum, postition)
|
||||
|
|
|
@ -606,20 +606,20 @@ func TestGetExpirationHeight(t *testing.T) {
|
|||
var expHeight uint32 = 0
|
||||
|
||||
expHeight = dbpkg.GetExpirationHeight(lastUpdated)
|
||||
if lastUpdated+dbpkg.NOriginalClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.NOriginalClaimExpirationTime, expHeight)
|
||||
if lastUpdated+dbpkg.OriginalClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.OriginalClaimExpirationTime, expHeight)
|
||||
}
|
||||
|
||||
lastUpdated = dbpkg.NExtendedClaimExpirationForkHeight + 1
|
||||
lastUpdated = dbpkg.ExtendedClaimExpirationForkHeight + 1
|
||||
expHeight = dbpkg.GetExpirationHeight(lastUpdated)
|
||||
if lastUpdated+dbpkg.NExtendedClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.NExtendedClaimExpirationTime, expHeight)
|
||||
if lastUpdated+dbpkg.ExtendedClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.ExtendedClaimExpirationTime, expHeight)
|
||||
}
|
||||
|
||||
lastUpdated = 0
|
||||
expHeight = dbpkg.GetExpirationHeightFull(lastUpdated, true)
|
||||
if lastUpdated+dbpkg.NExtendedClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.NExtendedClaimExpirationTime, expHeight)
|
||||
if lastUpdated+dbpkg.ExtendedClaimExpirationTime != expHeight {
|
||||
t.Errorf("Expected %d, got %d", lastUpdated+dbpkg.ExtendedClaimExpirationTime, expHeight)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
no need to start these with N
and many of these are unused
is this really no big deal? seems like an error to me but idk rocksdb
typo: Famlies -> Families
this can be unexported
still need this?
typo
👀