-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Part 2 of Aligning Core Package with Latest 2.1 - Helper Functions #403
Part 2 of Aligning Core Package with Latest 2.1 - Helper Functions #403
Conversation
Codecov Report
@@ Coverage Diff @@
## master #403 +/- ##
==========================================
+ Coverage 57.96% 57.96% +<.01%
==========================================
Files 31 31
Lines 2500 2510 +10
==========================================
+ Hits 1449 1455 +6
- Misses 881 884 +3
- Partials 170 171 +1
Continue to review full report at Codecov.
|
beacon-chain/blockchain/core_test.go
Outdated
if err := beaconChain.SetCrystallizedState(state); err != nil { | ||
t.Fatalf("unable to mutate crystallized state: %v", err) | ||
} | ||
_, err := beaconChain.getIndicesForHeight(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if _, err := ; err != nil {
} | ||
|
||
func TestGetBlockHash(t *testing.T) { | ||
beaconChain, db := startInMemoryBeaconChain(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use database.NewKVStore() from the shared/database package instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is using NewKvStore(). startInMemoryBeaconChain()
sets config's InMemory
to true
func NewDB(config *DBConfig) (*DB, error) {
...
if config.InMemory {
db._db = NewKVStore()
return db, nil
}
...
}
Implemented the following helper functions that got introduced in 2.1:
getIndicesByHeight
takes input height and returns the validator committee list of that height. The validator committee list consists of validator indices of different shards.getBlockHash
takes input height and returns the block hash of that given height.