mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Attestation Using Head State instead of Latest State (#2156)
* headRoot is a better name * yay merged with master * fixed attester server returning incorrect attestation field values * revert stupid mock changes * fixed and updated all the tests * uncomment * head start should handle skip blocks * Raul's feedback
This commit is contained in:
committed by
Raul Jordan
parent
9abefc386d
commit
a19f08f7b6
@@ -96,7 +96,7 @@ func setUpGenesisStateAndBlock(beaconDB *db.BeaconDB, t *testing.T) {
|
||||
if err := beaconDB.InitializeState(unixTime, []*pb.Deposit{}, nil); err != nil {
|
||||
t.Fatalf("could not initialize beacon state to disk: %v", err)
|
||||
}
|
||||
beaconState, err := beaconDB.State(ctx)
|
||||
beaconState, err := beaconDB.HeadState(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("could not attempt fetch beacon state: %v", err)
|
||||
}
|
||||
@@ -266,7 +266,7 @@ func TestProcessingBatchedBlocks_OK(t *testing.T) {
|
||||
|
||||
ss.processBatchedBlocks(msg)
|
||||
|
||||
state, err := db.State(context.Background())
|
||||
state, err := db.HeadState(context.Background())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -310,7 +310,7 @@ func TestProcessingBlocks_SkippedSlots(t *testing.T) {
|
||||
t.Fatalf("Unable to hash block %v", err)
|
||||
}
|
||||
parentHash := h[:]
|
||||
state, err := db.State(context.Background())
|
||||
state, err := db.HeadState(context.Background())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -343,7 +343,7 @@ func TestProcessingBlocks_SkippedSlots(t *testing.T) {
|
||||
t.Fatalf("Could not hash block %v", err)
|
||||
}
|
||||
parentHash = hash[:]
|
||||
state, err := db.State(context.Background())
|
||||
state, err := db.HeadState(context.Background())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user