Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
This commit is contained in:
commit
11f54b9587
|
@ -826,6 +826,7 @@ proc delBlobSidecar*(
|
|||
root: Eth2Digest, index: BlobIndex): bool =
|
||||
var res = false
|
||||
for blobFork in BlobFork:
|
||||
if db.blobs[blobFork] == nil: continue
|
||||
if db.blobs[blobFork].del(blobkey(root, index)).expectDb():
|
||||
res = true
|
||||
res
|
||||
|
@ -1080,6 +1081,7 @@ proc getBlockSSZ*(
|
|||
proc getBlobSidecarSZ*[T: ForkyBlobSidecar](
|
||||
db: BeaconChainDB, root: Eth2Digest, index: BlobIndex,
|
||||
data: var seq[byte]): bool =
|
||||
if db.blobs[T.kind] == nil: return false
|
||||
let dataPtr = addr data # Short-lived
|
||||
func decode(data: openArray[byte]) =
|
||||
assign(dataPtr[], data)
|
||||
|
@ -1088,6 +1090,7 @@ proc getBlobSidecarSZ*[T: ForkyBlobSidecar](
|
|||
proc getBlobSidecar*[T: ForkyBlobSidecar](
|
||||
db: BeaconChainDB, root: Eth2Digest, index: BlobIndex,
|
||||
value: var T): bool =
|
||||
if db.blobs[T.kind] == nil: return false
|
||||
db.blobs[T.kind].getSZSSZ(blobkey(root, index), value) == GetResult.found
|
||||
|
||||
proc getBlockSZ*(
|
||||
|
|
Loading…
Reference in New Issue