mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-01 15:57:39 +00:00
sharding: feedback changes
Former-commit-id: 3251e6a3a13984b154dfb82ffae68ec214177829 [formerly 0bc330ae3445a0d88d014afa412dd4e21bdb5208] Former-commit-id: 3c3938127ccc1f56ced09496038fa0d72ed32ae7
This commit is contained in:
parent
f32a80a911
commit
b923b9e101
File diff suppressed because one or more lines are too long
@ -87,7 +87,8 @@ contract SMC {
|
||||
|
||||
// Get the most recent block number before the period started
|
||||
uint latestBlock = period * PERIOD_LENGTH - 1;
|
||||
uint index = uint(keccak256(block.blockhash(latestBlock), _index, shardId)) % sampleSize;
|
||||
uint latestBlockHash = uint(block.blockhash(latestBlock));
|
||||
uint index = uint(keccak256(latestBlockHash, _index, shardId)) % sampleSize;
|
||||
|
||||
return notaryPool[index];
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ func TestNotaryRegister(t *testing.T) {
|
||||
var txOpts [notaryCount]*bind.TransactOpts
|
||||
genesis := make(core.GenesisAlloc)
|
||||
|
||||
// initializes back end with 3 accounts and each with 2000 eth balances
|
||||
for i := 0; i < notaryCount; i++ {
|
||||
key, _ := crypto.GenerateKey()
|
||||
notaryPoolPrivKeys[i] = key
|
||||
@ -420,6 +421,7 @@ func TestCommitteeListsAreDifferent(t *testing.T) {
|
||||
var txOpts [notaryCount]*bind.TransactOpts
|
||||
genesis := make(core.GenesisAlloc)
|
||||
|
||||
// initializes back end with 1000 accounts and each with 2000 eth balances
|
||||
for i := 0; i < notaryCount; i++ {
|
||||
key, _ := crypto.GenerateKey()
|
||||
notaryPoolPrivKeys[i] = key
|
||||
@ -469,6 +471,7 @@ func TestGetCommitteeWithNonMember(t *testing.T) {
|
||||
var txOpts [notaryCount]*bind.TransactOpts
|
||||
genesis := make(core.GenesisAlloc)
|
||||
|
||||
// initializes back end with 11 accounts and each with 2000 eth balances
|
||||
for i := 0; i < notaryCount; i++ {
|
||||
key, _ := crypto.GenerateKey()
|
||||
notaryPoolPrivKeys[i] = key
|
||||
@ -511,6 +514,7 @@ func TestGetCommitteeAfterDeregisters(t *testing.T) {
|
||||
var txOpts [notaryCount]*bind.TransactOpts
|
||||
genesis := make(core.GenesisAlloc)
|
||||
|
||||
// initializes back end with 10 accounts and each with 2000 eth balances
|
||||
for i := 0; i < notaryCount; i++ {
|
||||
key, _ := crypto.GenerateKey()
|
||||
notaryPoolPrivKeys[i] = key
|
||||
|
Loading…
Reference in New Issue
Block a user