Skip to content

Commit 56e5f28

Browse files
committed
fix: avoid *const SignedBlock
1 parent 5259aae commit 56e5f28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/state_transition/signature_sets/proposer.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const computeSigningRoot = @import("../utils/signing_root.zig").computeSigningRo
1111
const verifySignatureSet = @import("../utils/signature_sets.zig").verifySingleSignatureSet;
1212
const SignedBlock = @import("../types/signed_block.zig").SignedBlock;
1313

14-
pub fn verifyProposerSignature(cached_state: *CachedBeaconStateAllForks, signed_block: *const SignedBlock) !bool {
14+
pub fn verifyProposerSignature(cached_state: *CachedBeaconStateAllForks, signed_block: SignedBlock) !bool {
1515
const signature_set = try getBlockProposerSignatureSet(cached_state.allocator, cached_state, signed_block);
1616
return try verifySignatureSet(&signature_set);
1717
}
1818

1919
// TODO: support SignedBlindedBeaconBlock
20-
pub fn getBlockProposerSignatureSet(allocator: Allocator, cached_state: *CachedBeaconStateAllForks, signed_block: *const SignedBlock) !SingleSignatureSet {
20+
pub fn getBlockProposerSignatureSet(allocator: Allocator, cached_state: *CachedBeaconStateAllForks, signed_block: SignedBlock) !SingleSignatureSet {
2121
const config = cached_state.config;
2222
const state = cached_state.state;
2323
const epoch_cache = cached_state.getEpochCache();

src/state_transition/state_transition.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub fn stateTransition(
124124
try processSlotsWithTransientCache(allocator, post_state, block_slot, .{});
125125

126126
// Verify proposer signature only
127-
if (opts.verify_proposer and !try verifyProposerSignature(post_state, &signed_block)) {
127+
if (opts.verify_proposer and !try verifyProposerSignature(post_state, signed_block)) {
128128
return error.InvalidBlockSignature;
129129
}
130130

0 commit comments

Comments
 (0)