Skip to content

Commit

Permalink
defer without function wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
y0sher committed Oct 27, 2024
1 parent 9d2f3ea commit 95aeb43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions signer/sign_attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ func (signer *SimpleSigner) SignBeaconAttestation(attestation *phase0.Attestatio
// 2. lock for current account
val := signer.lock(account.ID(), "attestation")
val.Lock()
defer func() {
val.Unlock()
}()
defer val.Unlock()

// 3. far future check
if !IsValidFarFutureEpoch(signer.network, attestation.Target.Epoch) {
Expand Down

0 comments on commit 95aeb43

Please sign in to comment.