mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
REST VC: Subscribe to Beacon API events (#13453)
* Revert "Revert "REST VC: Subscribe to Beacon API events (#13354)" (#13428)"
This reverts commit 8d092a1113.
* change logic
* review
* test fix
* fix critical error
* merge flag check
* change error msg
* return on errors
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
@@ -394,7 +394,7 @@ func TestWaitSync_ContextCanceled(t *testing.T) {
|
||||
n := validatormock.NewMockNodeClient(ctrl)
|
||||
|
||||
v := validator{
|
||||
node: n,
|
||||
nodeClient: n,
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
@@ -414,7 +414,7 @@ func TestWaitSync_NotSyncing(t *testing.T) {
|
||||
n := validatormock.NewMockNodeClient(ctrl)
|
||||
|
||||
v := validator{
|
||||
node: n,
|
||||
nodeClient: n,
|
||||
}
|
||||
|
||||
n.EXPECT().GetSyncStatus(
|
||||
@@ -431,7 +431,7 @@ func TestWaitSync_Syncing(t *testing.T) {
|
||||
n := validatormock.NewMockNodeClient(ctrl)
|
||||
|
||||
v := validator{
|
||||
node: n,
|
||||
nodeClient: n,
|
||||
}
|
||||
|
||||
n.EXPECT().GetSyncStatus(
|
||||
@@ -1304,7 +1304,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1386,7 +1386,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1464,7 +1464,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1525,7 +1525,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1593,7 +1593,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1657,7 +1657,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
@@ -1752,7 +1752,7 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
nodeClient: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]primitives.ValidatorIndex),
|
||||
signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1),
|
||||
|
||||
Reference in New Issue
Block a user