fix txpool prevRandao setter

This commit is contained in:
jangko 2022-03-30 09:55:03 +07:00
parent 6a90937d4b
commit 61d7a9acea
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 7 additions and 1 deletions

View File

@ -828,6 +828,12 @@ proc `head=`*(xp: TxPoolRef; val: BlockHeader)
xp.pDirtyBuckets = true
xp.bucketFlushPacked
proc `prevRandao=`*(xp: TxPoolRef; val: Hash256) =
## Setter, PoS block randomness
## Used by `prevRandao` op code in EVM after transition to PoS
## do nothing before transition
xp.chain.prevRandao = val
# ------------------------------------------------------------------------------
# Public functions, per-tx-item operations
# ------------------------------------------------------------------------------

View File

@ -67,7 +67,7 @@ type
txEnv: TxChainPackerEnv ## Assorted parameters, tx packer environment
# EIP-4399 and EIP-3675
prevRandao: Hash256 ## POS block randomness
prevRandao: Hash256 ## PoS block randomness
# ------------------------------------------------------------------------------
# Private functions