Skip to content

Commit

Permalink
adding another unit test and gaz
Browse files Browse the repository at this point in the history
  • Loading branch information
james-prysm committed Jan 19, 2024
1 parent 91c9bc4 commit c880301
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/validator/service/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(
"@com_github_ethereum_go_ethereum//common:go_default_library",
"@com_github_ethereum_go_ethereum//common/hexutil:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)

Expand Down
2 changes: 2 additions & 0 deletions validator/client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ go_library(
"@org_golang_google_grpc//status:go_default_library",
"@org_golang_google_protobuf//proto:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)

Expand Down Expand Up @@ -176,5 +177,6 @@ go_test(
"@org_golang_google_grpc//metadata:go_default_library",
"@org_golang_google_grpc//status:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)
22 changes: 22 additions & 0 deletions validator/client/propose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,28 @@ func Test_findBuilderBoost(t *testing.T) {
Value: 123,
},
},
{
name: "Proposer settings with builder settings and specific propose config but wrong pubkey",
args: args{
proposerSettings: &validatorserviceconfig.ProposerSettings{
ProposeConfig: func() map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption {
config := make(map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption)
bb := uint64(123)
config[[fieldparams.BLSPubkeyLength]byte{'z'}] = &validatorserviceconfig.ProposerOption{
FeeRecipientConfig: &validatorserviceconfig.FeeRecipientConfig{
FeeRecipient: common.HexToAddress("a"),
},
BuilderConfig: &validatorserviceconfig.BuilderConfig{
Enabled: true,
BuilderBoostFactor: &bb,
},
}
return config
}(),
},
},
want: nil,
},
{
name: "Proposer settings with builder settings and default config",
args: args{
Expand Down

0 comments on commit c880301

Please sign in to comment.