File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ use warp::{
20
20
Reply ,
21
21
} ;
22
22
23
+ /// If default boost factor is provided in validator/blocks v3 request, we will skip the calculation
24
+ /// to keep the precision.
25
+ const DEFAULT_BOOST_FACTOR : u64 = 100 ;
26
+
23
27
pub fn get_randao_verification (
24
28
query : & api_types:: ValidatorBlocksQuery ,
25
29
randao_reveal_infinity : bool ,
@@ -52,14 +56,19 @@ pub async fn produce_block_v3<T: BeaconChainTypes>(
52
56
} ) ?;
53
57
54
58
let randao_verification = get_randao_verification ( & query, randao_reveal. is_infinity ( ) ) ?;
59
+ let builder_boost_factor = if query. builder_boost_factor == Some ( DEFAULT_BOOST_FACTOR ) {
60
+ None
61
+ } else {
62
+ query. builder_boost_factor
63
+ } ;
55
64
56
65
let block_response_type = chain
57
66
. produce_block_with_verification (
58
67
randao_reveal,
59
68
slot,
60
69
query. graffiti ,
61
70
randao_verification,
62
- query . builder_boost_factor ,
71
+ builder_boost_factor,
63
72
BlockProductionVersion :: V3 ,
64
73
)
65
74
. await
You can’t perform that action at this time.
0 commit comments