File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ const allocator = if (builtin.mode == .Debug)
1515else
1616 std .heap .c_allocator ;
1717
18- /// Parse a JS options object into Zig's TransitionOpt .
18+ /// Parse a JS options object into Zig's TransitionOpts .
1919///
2020/// Recognized fields:
2121/// - verifyStateRoot, verifyProposer, verifySignatures: bool
2222/// - dontTransferCache: bool (negated to set transfer_cache)
23+ /// - executionPayloadStatus: "valid" | "invalid" | "preMerge"
24+ /// - dataAvailabilityStatus: "Available" | "PreData" | "OutOfRange"
2325///
2426/// This is the double negative version to conform with production lodestar.
2527/// TODO(bing): Eventually rename `dontTransferCache` to `transferCache` to avoid double negation because its confusing naming.
@@ -93,6 +95,7 @@ pub fn stateTransition(
9395 const env = js .env ();
9496 const pre_state = pre_state_value .toValue ();
9597 const cached_state = try env .unwrap (CachedBeaconState , pre_state );
98+ const transition_opts = try parseOptions (options );
9699 const signed_block_bytes_slice = try signed_block_bytes .toSlice ();
97100
98101 const current_epoch = st .computeEpochAtSlot (try cached_state .state .slot ());
@@ -110,7 +113,7 @@ pub fn stateTransition(
110113 napi_io .get (),
111114 cached_state ,
112115 signed_block ,
113- try parseOptions ( options ) ,
116+ transition_opts ,
114117 );
115118 errdefer {
116119 post_state .deinit ();
You can’t perform that action at this time.
0 commit comments