db.getBlockSZ: Remove no-op 'success' var (#4461)

This commit is contained in:
henridf 2023-01-05 18:31:46 +01:00 committed by GitHub
parent ec01065555
commit 3a84d61b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1048,10 +1048,9 @@ proc getBlockSZ*[
eip4844.TrustedSignedBeaconBlock](
db: BeaconChainDB, key: Eth2Digest, data: var seq[byte], T: type X): bool =
let dataPtr = addr data # Short-lived
var success = true
func decode(data: openArray[byte]) =
assign(dataPtr[], data)
db.blocks[T.toFork].get(key.data, decode).expectDb() and success
db.blocks[T.toFork].get(key.data, decode).expectDb()
proc getBlockSZ*(
db: BeaconChainDB, key: Eth2Digest, data: var seq[byte],